The i18n module hooking into db_rewrite_sql caused an error suggesting 'n.language' wasn't a proper column for the node table. The attached patch fixes this.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | NodeReferrer_616400_1.patch | 730 bytes | nhck |
The i18n module hooking into db_rewrite_sql caused an error suggesting 'n.language' wasn't a proper column for the node table. The attached patch fixes this.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | NodeReferrer_616400_1.patch | 730 bytes | nhck |
Comments
Comment #1
nhck commentedComment #2
andypostCommited, thanx
Comment #3
andypostAre you really sure that l10n need "node" table and not "node2" table?
Comment #4
nhck commentedI reviewed this and my conclusion is: It depends on the expected return value of nodereferrer_referrers_with_translations() - unfortunately this is not documented:
In my opinion it be node if all nodes, including the original one should be returned.
If the original one should be excluded it should be it should be node2.
This behavior is due to the INNER JOIN in the sql clause which imposes the node2 data on the node data.
i18n attaches a query that might look like this (db_rewrite_sql($query) - default usage)
The query I debugged with looks like this (here db_rewrite_sql($query,'node') was chosen)
Comment #5
andypostSuppose we should filter node by language to return all referrers