FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » In FUDforum 2.5.0 stable, clicking on queue moderation gives an SQL error
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
In FUDforum 2.5.0 stable, clicking on queue moderation gives an SQL error [message #11481] Mon, 30 June 2003 16:10 Go to next message
lstep is currently offline  lstep   France
Messages: 50
Registered: June 2003
Karma: 0
Member

If there is a message that waits to be moderated (new message from a thread that is moderated), and if I click on the link to go to the queue moderation, I get the following SQL error:

Warning: pg_query() query failed: ERROR: pg_atoi: error in "._uid.": can't parse "._uid." in /var/www/dvar/index.php on line 169
(index.php) : ERROR: pg_atoi: error in "._uid.": can't parse "._uid."
Query: SELECT m.*, t.locked, t.root_msg_id, t.last_post_id, t.forum_id, f.message_threshold, f.name AS frm_name, c.name AS cat_name, u.id AS user_id, u.alias AS login, u.display_email, u.avatar_approved, u.avatar_loc, u.email, u.posted_msg_count, u.join_date, u.location, u.sig, u.custom_status, u.icq, u.jabber, u.affero, u.aim, u.msnm, u.yahoo, u.invisible_mode, u.email_messages, u.is_mod, u.last_visit AS time_sec, l.name AS level_name, l.pri AS level_pri, l.img AS level_img, p.max_votes, p.expiry_date, p.creation_date, p.name AS poll_name, p.total_votes, pot.id AS cant_vote FROM fud25_msg m INNER JOIN fud25_thread t ON m.thread_id=t.id INNER JOIN fud25_forum f ON t.forum_id=f.id INNER JOIN fud25_cat c ON f.cat_id=c.id LEFT JOIN fud25_users u ON m.poster_id=u.id LEFT JOIN fud25_level l ON u.level_id=l.id LEFT JOIN fud25_poll p ON m.poll_id=p.id LEFT JOIN fud25_poll_opt_track pot ON pot.poll_id=p.id AND pot.user_id='._uid.' WHERE f.moderated='Y' AND m.approved='N' ORDER BY f.view_order, m.post_stamp DESC LIMIT 40

So I don't have any way to access the messages to be moderated Sad
(I'm using PostgresSQL as database if that may be useful)
icon14.gif  Re: In FUDforum 2.5.0 stable, clicking on queue moderation gives an SQL error [message #11484 is a reply to message #11481] Mon, 30 June 2003 18:02 Go to previous messageGo to next message
lstep is currently offline  lstep   France
Messages: 50
Registered: June 2003
Karma: 0
Member

OK, my wife found the bug (and the patch Very Happy
The problem comes from the mismatch in single and double quotes in the file
theme/default/modque.php, around line 2085, there is the following excerpt:
'._uid.'

It should be:
"._uid"


Here is the exact corrected snippet of the file theme/default/modque.php:

.($usr->is_mod != 'A' ? ' INNER JOIN fud25_mod mm ON f.id=mm.forum_id AND mm.user_id='._uid.' ' : '')."
INNER JOIN fud25_cat c ON f.cat_id=c.id
LEFT JOIN fud25_users u ON m.poster_id=u.id
LEFT JOIN fud25_level l ON u.level_id=l.id
LEFT JOIN fud25_poll p ON m.poll_id=p.id
LEFT JOIN fud25_poll_opt_track pot ON pot.poll_id=p.id AND pot.user_id="._uid."
WHERE
f.moderated='Y' AND m.approved='N'
ORDER BY f.view_order, m.post_stamp DESC LIMIT ".$POSTS_PER_PAGE);
Re: In FUDforum 2.5.0 stable, clicking on queue moderation gives an SQL error [message #11595 is a reply to message #11484] Wed, 09 July 2003 13:30 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Fixed in CVS.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Single quote in user name
Next Topic: 2.5.0 minipager bug (thread.php.t)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Dec 02 10:10:49 GMT 2024

Total time taken to generate the page: 0.03445 seconds