when you set the i18n content selection mode to "all content" and use the i18n content negotiating filter in a view, the view results in an SQL error because the filter generates a "AND ()" in the where clause instead of just leaving the filter blank what should be dine when "all content" (=no filtering) is selected.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | content_negotiation_filter_handler-522162-2.patch | 1.03 KB | markus_petrux |
Comments
Comment #1
y_h commentedI've had the same problem and rewrote the file i18n/i18nviews/includes/content_negotiation_filter_handler.inc
fixed the "AND ()" error by throwing a simple check if the $where var was empty or not.
and for the filter to actually work i had to add 'strict' as the $mode argument for the i18n_db_rewrite_where function
fix:
Comment #2
markus_petrux commentedAttached patch fixes the above mentioned issue, and another issue that I've found in this handler: it builds the join and where clause against the node table, ignoring relationships. This is fixed using the
$this->ensure_my_table()and getting the table alias from$this->table_alias.Comment #3
jose reyero commentedFixed, thanks