Forum OpenACS Q&A: Problem with comments.

Collapse
Posted by Anton Bajri on
I found problems trying to approve cooments with OpenACS 3.2.4-1
(from RPM). The
/admin/general-comments/index.tcl admin page isn't finding
any comments, because of the the query

"select
gc.*,
first_names || ' ' || last_name as commenter_name,
tm.admin_url_stub,
tm.section_name
from general_comments gc, users, table_acs_properties tm
where users.user_id = gc.user_id
and gc.on_which_table = tm.table_name
$where_clause_for_section
$where_clause_for_approval
$where_clause_for_time
order by gc.on_which_table, gc.comment_date desc"

The problem is that gc.on_which_table is 'news_item' and
tm.table_name is
'news'.
This 'news' value is loaded record is loaded in general-comments.sql
with

insert into table_acs_properties
(table_name, module_key, section_name, user_url_stub, admin_url_stub)
values
(''news'',''news'',''News'',''/news/item.tcl?
news_item_id='',''/admin/news/item.tcl?news_item_id='');

I tryed changing the table_name field to news_items, and now
everything seems to work as advertized. Anyone?

Saludos, and sorry for my english,

Jorge

Collapse
Posted by Don Baccus on
Well, this is either another ACS Classic problem we didn't ferret out
while porting, or our problem caused because it was missed when
weeding through patch logs.

The news table used to be called "news".  Then it got changed
(frivolously, IMO) to "news_items".  Not all references to "news" were
changed to "news_items" by the author at aD.  You've caught one.

Your change is correct, I'll try to commit it to the tree shortly.

Thanks.

Collapse
Posted by Don Baccus on
I just checked latest sources, the insert was changed some time ago,
apparently.  The tar download has it wrong, the latest CVS tree has it
right.