- I have two nodes, A and B, both language "en".
- In a node reference field in node A, I select node B.
- I can see in the DB that a new row appears in that field's table, linking node A to node B, with language set to "en".
- I can also see that CNR has created a new row with the reverse relationship, EXCEPT the language is set to "und".

When I then go to edit node B, node A ISN'T pre-selected as a referenced node.
If I manually edit the DB and set the language from "und" to "en", and flush the caches, then node A does show up as a pre-selected referenced node when editing node B.

TO FIX: CNR needs to create the back reference with the correct language, not "und". I presume the language is that of the 1st node doing the referencing?

Comments

ClaudeS-1’s picture

Further observation:
This is repeatable, but not every time. Sometimes I can create references between two existing "en" nodes and the reference gets "en" set, sometimes it gets "und" (mostly when setting a reference on new nodes for the first time)

jbiechele’s picture

I have the same issue here and would be happy for any hint on how to fix this.

Is this realted with issue #1099956 in the References issues queue?
References without multilingual support with content in different languages doesn't work

How can I force cnr to store the language code of the original node in the referenced language code field?

pav’s picture

+1

scrat000’s picture

The same problem :(

scrat000’s picture

Issue summary: View changes

typo

gratsch’s picture

Issue summary: View changes
StatusFileSize
new2.4 KB

CNR version = "7.x-4.22"

I noticed that after changing the default languag the automatic connection was not created anymore.
In the file corresponding_node_references.crud.inc i found that the default language is used to check of there are references.
With load_node I found the referenced field with the language 'und'.
After creating new content types the language 'und' was still used (and the language was differend).

In the include file I made some changes.
New: function _corresponding_node_references_langcheck
To collect the next array key (language key).
If no key is found the language key 'und' will be used.

New in several functions:
- $lang_key = _corresponding_node_references_langcheck($referenced_node, $away_field);
- references->languages is replaced bij $lang_key

For my site this was the solution.
I cound not find the rules when to use 'und' and when the languag.

If you use this file, test it first to make sure it will work for you.