I am using References Dialog together with References module. I have a content type that has a multivalue node reference field.
After adding another node reference field item I can't add any new values nor edit the existing values.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

martins.bertins’s picture

Status: Active » Needs review
FileSize
770 bytes

The problem is that in hook_element_info_alter() the after build function is added to the same element more than once if the field has multiple values.
Created a patch that prevents that.

manuelBS’s picture

This patch doesn't seam to work, same probelm as bevore.

martins.bertins’s picture

I am using References 7.x-2.0 and References dialog 7.x-1.x-dev. The patch applies with no errors and the multivalue field works as expected.
Are there any differences in your environment?

MXT’s picture

Status: Needs review » Reviewed & tested by the community

This patch works very well for me: thank you!!!

I'm using http://drupal.org/project/entityreference instead of References.

Can this patch be committed please?

Thank you

nyl_auster’s picture

Priority: Normal » Major

Thanks you very much for your patch. Works like a charm now.
Sounds like a major bug for me, because it became impossible to reference something once you clicked on "add more values".

edit : i'm using References dialog 7.x-1.x-dev and references version = "7.x-2.0"

manuelBS’s picture

Sorry, i got another version. Now it works for me, too. Great work, thank you!

fabsor’s picture

Status: Reviewed & tested by the community » Fixed

Commited, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.