Behavior detected:

I am just working in translating a considerably big site into spanish, and one thing I noticed was the following:

- I have a content type A with a nodereference field to content types B.
- I have a few content types B translated (not everyone).
- When translating a content type A which is referenced to one (or more, but not every one) of the translated content type B, only the translated ones are selected by default, but not the untranslated ones, although they ARE showing in the nodereference field (because they are currently neutral).
- If content type A has reference only to untranslated nodes, those are properly select as defaults for the translations.

I spent hours looking at the insight of cck and i18n to figure out what was going on, and eventually try to solve it. I could have done this as a workaround myself, but thought it was worth looking at what was going on for real and I think that I found the cause. I hope it was and I am right with this one :).

Attached is the patch, pretty simple (1 line change to read).

Basically, because and default_values additions have string keys, array_merge was not appending the data, but rather overwriting it. I think array_merge_recursive is the way to go.

Comments

hanoii’s picture

Issue tags: +i18n + CCK, +18n

Adding some tags

avpaderno’s picture

Version: 6.x-2.6 » 6.x-2.x-dev
Issue summary: View changes
Status: Needs review » Closed (outdated)
Issue tags: -i18n + CCK, -18n

I am closing this issue, since Drupal 6 isn't supported anymore.