Last modified: 2010-05-15 15:41:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 6956 - Database syntax error loading SpecialNewImages
Database syntax error loading SpecialNewImages
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.7.x
PC Windows XP
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 6959 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-09 15:01 UTC by James Mitchell
Modified: 2010-05-15 15:41 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description James Mitchell 2006-08-09 15:01:23 UTC
1st off my system is running

MediaWiki: 1.7.1 
PHP: 5.1.4-0.1 (cgi-fcgi) 
MySQL: 5.0.22-Debian_3-log 

I get the following error when loading the Special:Newimages (Gallery of new 
files)

"A database query syntax error has occurred. This may indicate a bug in the 
software. The last attempted database query was: 
(SQL query hidden)
from within function "wfSpecialNewImages". MySQL returned error "1064: You 
have an error in your SQL syntax; check the manual that corresponds to your 
MySQL server version for the right syntax to use near ') WHERE ug_group IS 
NULL ORDER BY img_timestamp DESC LIMIT 1' at line 1 (localhost)"."

Can anyone help as this is a important feature for my wiki site
Comment 1 Greg Sabino Mullane 2006-08-09 15:26:01 UTC
It would help if we could see the complete query that is being run. Add this
line to your LocalSeetings.php file:

$wgShowSQLErrors = true;

then reload the page and post the SQL here (it will replace the "SQL query
hidden" text above.
Comment 2 James Mitchell 2006-08-09 15:31:29 UTC
Thanks for the quick reply here is the info you need

A database query syntax error has occurred. This may indicate 
a bug in the software. The last attempted database query was: 
SELECT img_timestamp from `image` LEFT OUTER JOIN 
`user_groups` ON img_user=ug_user AND () WHERE ug_group IS 
NULL ORDER BY img_timestamp DESC LIMIT 1
from within function "wfSpecialNewImages". MySQL returned 
error "1064: You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the 
right syntax to use near ') WHERE ug_group IS NULL ORDER BY 
img_timestamp DESC LIMIT 1' at line 1 (localhost)".
Comment 3 Greg Sabino Mullane 2006-08-09 16:11:29 UTC
Looks like you have no bots defined in your group permissions. Adding them back
in should fix this. Add this line to either LocalSettings.php or back into
DefaultSettings.php, where it was:

$wgGroupPermissions['bot'  ]['bot'] = true;

I'll commit a patch in a second to more gracefully handle the case in where one
has no bot permissions.

Comment 4 Greg Sabino Mullane 2006-08-09 16:15:00 UTC
Fixed in revision 16002.
Comment 5 James Mitchell 2006-08-09 16:18:49 UTC
Thanks for that want to confirm that was fixed

The bot was in the defaultsettings.php but i had been adding grouppermissions into the localsettings.php to 
change them. Bot permissions where not in my edits. I thought that if it is not in localsettings it will use 
what is in default settings.

Oh well thanks again for the quick resolution
Comment 6 Jimmy Collins 2006-08-09 21:38:31 UTC
*** Bug 6959 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links