Needs review
Project:
Node Relationships
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2011 at 13:26 UTC
Updated:
21 Oct 2011 at 16:08 UTC
Steps to reproduce:
The expected behaviour would be to have the node relationships link for adding a new translation of the untranslated related node.
Instead the multigroup removes the original node reference field which will be substituted by the plain node reference field: theme_content_multigroup_node_form() uses drupal_render() in order to regenerate the fields inside the multigroup form.
It looks that node relationships alters the form with _noderelationships_parent_node_form_build_translation_settings() (called by _noderelationships_parent_node_form_alter()) but after doing that CCK3 regenerates the fields.
Comments
Comment #1
finex commentedQuick update: only the "translate and reference" link is not rendered, instead the other node relationships buttons are correctly rendered.
Comment #2
finex commentedI've found and solved the bug. The problem is due to a wrong regexp in the Drupal.nodeRelationshipsReferenceButtons.getDelta()
In the current -dev version of noderelationships (file node_form.js) the function is:
Unfortunatly the "name" property of the nodereference field inside a multigroup field (CCK3) has the following structure:
group_NAME[DELTA][field_NAME][nid][nid]The fix is easy: just exclude the whole substring after the DELTA with a simple ".*".
I hope this fix will be applied.
Thanks