Closed (fixed)
Project:
Internationalization
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jun 2006 at 22:02 UTC
Updated:
8 Jan 2009 at 15:06 UTC
The i18n_node table has translation id 0 for nodes that have no translation. When the translation module tries to find out if a node has a translation, it performs an inner join on the translation id. If several untranslated items exist, they will all have trid 0 and can be mistaken for translations of each other. To fix this, append ' AND a.trid != 0' to all such queries.
I found two of those queries in translation.module and fixed them (patch attached). Hopefully that's all of them.
| Comment | File | Size | Author |
|---|---|---|---|
| translation.module_0.patch | 1.32 KB | Bodo Maass |
Comments
Comment #1
jose reyero commentedI think the second part of the patch looks good.
But the first one, the trid != 0 condition is already in the conditions to be merged,
$conds[] = "b.trid != 0";
why do we need it again?
Comment #2
pepeek commentedCorrect, the second part of the patch fixes the problem allright!
Comment #3
skoob commentedRegarding the trid, would it make sense to instead have trid equal the nid of the original node? That way you could easily find out which of the node is the original (ie WHERE trid=nid). AFAICS, there is no way in the current model to find that information (but i might be wrong, I've just started trying to figure out how the code works). This could be useful for things like figuring out whether a translation needs updating when the original has been modified.
You could still find nodes that don't have any translations by looking for trid's with only one entry (e.g. with GROUP BY and COUNT()).
BTW, what is the best place to discuss i18n development?
Comment #4
jose reyero commentedThanks, fixed
Comment #5
(not verified) commentedComment #6
apq commentedHi,
Is it really fixed in the 5.x-2.4 version?
The default value for trid in i18n_node table is 0, so the condition AND n.trid is not null doesn't work. Changing it for AND n.trid <>0 works ok.
Thank's!