Closed (fixed)
Project:
File import
Version:
5.x-1.0
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2008 at 14:24 UTC
Updated:
5 May 2009 at 00:10 UTC
the i18n module's hook breaks the query on line 171:
$result = db_query(db_rewrite_sql("SELECT {node}.nid, {node}.title FROM {node} where type in (".implode(',',$allowed_types).") ORDER BY {node}.created DESC"));
I had to change both the where to uppercase, and tell the rewrite the "node" was the primary table...
$result = db_query(db_rewrite_sql("SELECT {node}.nid, {node}.title FROM {node} WHERE type in (".implode(',',$allowed_types).") ORDER BY {node}.created DESC", "node"));
Can someone update the code in CVS?
Comments
Comment #1
pixelpreview@gmail.com commentedI have the same problem with file import module :
The module don't show the node id and the node title on the admin of the module
please help
it's the where clause ... The db_rewrite_sql is not correctly called in the module and i18n can't append his proper where to the sql syntax from this module.
the soluce is to write a file_import_db_rewrite_sql() function in the module with a $array['where'] = "the where clause".
and to call this new function at the line 171
Comment #2
neochief commenteddb_rewrite_sql calls removed in 5.1 and 6.x, so it should not bother anyone starting from this moment