Closed (fixed)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jan 2008 at 19:51 UTC
Updated:
17 Nov 2008 at 15:12 UTC
Jump to comment: Most recent file
Comments
Comment #1
catchmoving here on the assumption this is an i8n bug
Comment #2
cestmoi commentedI have similar error when using the bookimport mdoule (Drupal 5.5):
I don't have this problem on another test site with Drupal 5.3 and i18n ver 5.x-1.x-dev
Comment #3
jmlavarenne commentedAdding myself here because I have the same issue when using empty text in views.
Comment #4
harineel commentedi also got the same problem
Comment #5
agentrickardfunction i18n_views_filter_handler() is missing the first parameter, $op.
Comment #6
agentrickardThe proper code is:
Apologies for the lack of a proper patch. Not sure if this actually fixes the error.
Comment #7
agentrickardThe error is in i18n_db_rewrite_sql() which is rewriting an empty query for Views that had a NULL result.
Comment #8
agentrickardThere are cases where Views passes an empty query to db_rewrite_sql -- this might be considered a views bug.
Fix is to alter
function i18n_bd_rewrite_sql()line 730 of i18n.module:Comment #9
agentrickardHere is the patch.
Comment #10
agentrickard@catch
I think this is actually a Views bug.
This patch addresses Views passing an empty query to db_rewrite_sql.
[edit] patch is malformed -- testing [/edit]
Comment #11
agentrickardComment #12
agentrickardHere's the patch -- guards against passing an empty $query to db_rewrite_sql().
Comment #13
agentrickardImproved version of the patch.
Comment #14
eMPee584 commentedagentrickard: your patch from #13 seems to be a good solution, thx!
Comment #15
sunThis was already fixed in #247420: SQL error when using empty text as argument default and #217015: Views module sends null query when building a block, and has been committed.
Comment #16
agentrickardAlready fixed by an issue with a higher node id. Odd. But hey, a fix is a fix.