When Content translation: Child translation is used a SQL error is shown:

SQLSTATE[42000]: Syntax error or access violation: 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 '.tnid0 IS NULL ) ))) subquery' at line 1

This seems to be the same error as #1224630: Filter by Content translation: Source translation causes an SQL error, because fix is the same (use query->add_where_expression instead query->add_where).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tunic’s picture

Priority: Normal » Major
Status: Active » Needs review
FileSize
684 bytes

Patch attatched. Giving same prority as mentioned bug.

dawehner’s picture

Status: Needs review » Fixed

Great, thanks!
The patch looked fine and worked fine, commited to 7.x-3.x

mohankirar’s picture

Title: Filter by Content translation: Child translation causes an SQL error » Got sql error when saved view after applying filter
Version: 7.x-3.x-dev » 7.x-3.0-rc1
Assigned: Unassigned » mohankirar
Status: Fixed » Active
FileSize
150.24 KB

Got sql error when saved view after applying filter to existing view.

SQLSTATE[42000]: Syntax error or access violation: 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 ')))) subquery' at line 3

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Can you please try to show the full sql query to see whether it's the same bug as this one?
If it's the same bug please update to the latest version of views.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)