First thx for this usefull module ;-)

I just want to let you know that I had a problem with my site. Only 1 language activated and set by default (in admin/config/regional/language). English checkbox is not checked (and don't want to check it for other reason).

CNR don't work at all in my site whatever I tried .... after a good debug session I originated the problem in field_sql_storage_field_storage_write (in the field core module)
where the sql query "update" is not executed for my corresponding field because a problem with language

    $field_languages = array_intersect($all_languages, array_keys((array) $entity->$field_name));

$all_languages contain an array with und as a key
And $entity->$field_name an array with "fr" as a key
Resulting in $field_languages as an empty array ...

Then in the function .... no sql update is done to the field ...

For your information I just patched this probleme in CNR by forcing a "und" in line 188 of
corresponding_node_references.crud.inc

                //$referenced_node->{$away_field}[$referenced_node->language][] = array('nid' => $home_node->nid);
                $referenced_node->{$away_field}['und'][] = array('nid' => $home_node->nid);

there is certainly an other good way to resolve this problem with a more generic solution but in my case it's ok ...

UPDATE:
finally I reversed my patch ... because I had other problem whith delete etc ....
So, I re-activated (checked) english in admin/config/regional/language even if I not use english ... and CNR works now.

Regards,
Nico.
PS: I learned stuff on how field and entity work during this debug !

Comments

nico059’s picture

Issue summary: View changes

update

czigor’s picture

Status: Active » Closed (duplicate)

I suspect this is a duplicate of http://drupal.org/node/1359834.

Please try the patch here: http://drupal.org/node/1359834#comment-5326804

If it does not help, feel free to reopen the issue.

czigor’s picture

Issue summary: View changes

typo