Somehow when assigning a translated node to a node, the translation id isn’t set properly in the database.

The tnid value is the same as the actual nid, which means that the translations block links to the page that is displayed.

SELECT *
FROM `node`
WHERE `nid` = `tnid`
LIMIT 30

Maybe that has to do something with my tests of using the entity translation module, which I have dismissed in the meantime.

Is there a fix for that?

Comments

webflo’s picture

Content translation uses 'tnid' for mapping different nodes together. All nodes in a translation set have the same tnid. The source not of a translations set has its own nid as tnid (tnid == nid).

Source node: tnid == nid
Child node (aka. translation): tnid != nid

So if tnid is identical to nid thats perfectly fine. This just mean, this is the source node of a translation set. Every node on your website can be a "source" node. This is not related to your default language. It just means, this is the first node is a translation set.

Use the node translation tab and assign new translations. It hope this helps ...

jose reyero’s picture

Category: bug » support
Status: Active » Fixed
yatil’s picture

Status: Fixed » Active

Okay, so that was a misconception on my side…

But still I got two nodes (nid 13 and 170), both having a tnid of 13 (which I think is correct), but the nid 13, which is in German, doesn’t show the Easy Read German translation when I go to the translate screen, even the autocomplete isn’t working. It works fine on the Easy Read German page, both articles show up.

yatil’s picture

Title: Link to translated node doesn’t work: nid==tnid » Link to translated node doesn’t work
webflo’s picture

Status: Active » Postponed (maintainer needs more info)

Do you use EntityCache?

yatil’s picture

@webflo: I actually do. Is it harmful?

webflo’s picture

Issue tags: +i18n compatibility
yatil’s picture

Priority: Major » Minor
Status: Postponed (maintainer needs more info) » Closed (works as designed)

@webflo: Thanks, this fixes the issue.

yatil’s picture

Priority: Minor » Normal
Status: Closed (works as designed) » Active

Actually it didn’t, still experiencing weird behavior :-(

jose reyero’s picture

Project: Internationalization » Entity cache
Version: 7.x-1.5 » 7.x-1.x-dev
Component: Blocks » Code
Issue tags: -i18n compatibility

Since node translations (nids, tnids) are handled by Drupal core's translation (not i18n), it looks to me like this belongs to entity cache. Moving there.

devin carlson’s picture

Status: Active » Closed (duplicate)

Marking this as a duplicate of the more established #1349566: Add tests for content translation.