Page MenuHomePhabricator

Database returned error ‘1064 when searching any term
Closed, ResolvedPublic

Description

Author: fiable

Description:
Since 2012-07-23, when some languages, including British English and Mongolian, are chosen on the left side of the homepage, I have been getting, when typing any word in the "Search" field and pressing "Enter" from the homepage, the following message:

"As an anonymous user, you can only add new data. If you would like to also modify existing data, please create an account and indicate your languages on your user page.
Database error
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

SELECT expression_id, language_id FROM uw_expression WHERE spelling=BINARY 'débit' AND uw_expression.remove_transaction_id IS NULL AND EXISTS (SELECT * FROM uw_syntrans WHERE uw_syntrans.expression_id=uw_expression.expression_id AND uw_syntrans.remove_transaction_id IS NULL ) AND language_id=

from within function ‘.’ Database 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 '' at line 1 (localhost).’ "


Version: unspecified
Severity: critical
URL: http://www.omegawiki.org/index.php?title=Expression%3Ad%C3%A9bit&setlang=en-gb

Details

Reference
bz38739

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:05 AM
bzimport set Reference to bz38739.
bzimport added a subscriber: Unknown Object (MLST).

fiable wrote:

Note that the search doesn't work.

kipmaster wrote:

Fixed! It happened when getLanguageIdForCode returns a null value in getExpressionsRecordSet, i.e. when there is no correspondance between a MediaWiki language code and a language_id in OmegaWiki.

I also updated the language table, where the MediaWiki code for en-gb was missing, and the one for Mongolian was wrong.