Closed (fixed)
Project:
Multiple Fields Remove Button
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
8 Feb 2014 at 15:39 UTC
Updated:
21 Nov 2024 at 22:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tatewaky commentedHi,
i ran out with the same issue, it turns that entities split it in other level on the array, this way:
http://i.imgur.com/b5YmVZT.png
i am attaching a patch that fix that issue, hopefully will be on the next version of the module.
Comment #2
Anonymous (not verified) commentedHey,
Thanks for the patch, applied the patch but am still having issues.
I've got four multipleER fields in the same page.
It works on some entity reference fields and not on others.
It works sometimes but fails most of the time.
Comment #3
alex.skrypnyktatewaky is right. Entity reference field requires deeper drilling down through $element array.
Attached patch solves this by explicitly handling entityreference field type - the change only reads values 1 array deeper .
The problem was related to the fact that remove button name atrribute was constructed incorrectly as none of the parents, including the field itself, were properly read from $element array. This made the button submit for incorrect fields and even incorrect values of the same field.
The patch also reorders how widget alter hook is applied to avoid triggering on all widgets - performance improvement.
Comment #4
antiorario commentedThe patch above failed. I recreated one with some cleanup.
Comment #5
jimmyko commented@antiorario
It is working! Thanks
Comment #6
paean99 commented#4 seems to be working for me.
Thanks.
Comment #7
geerlingguy commentedAnother RTBC here—before applying patch, only the first element was being removed on a multi-value entityreference_autocomplete field (even though UI showed otherwise). After applying patch, the correct field was removed when saving the node.
This patch fixes this issue, plus #2457573: Remove button not working properly on entity reference, which I've marked as a duplicate. Applies cleanly to 7.x-1.x dev branch, please commit if possible!
Comment #8
martin_qAlso confirm that #4 patch works for me; and I was able to add a further patch for Scald atom reference using the same principle, and that worked great too.
Comment #9
mxr576RTBC++
Comment #11
asghar commentedThanks to all. I have implemented the patch and will release new version.
Comment #12
asghar commentedComment #14
martichka5 commentedHello,
Thank you for the module and its functionality.
I have encountered a problem with all field types allowed to the module. In our case we use multiple entityreference field. The problem is that when we remove some value and then without saving the whole node we click "Add another Item" the last row value is added no matter which value we have removed. Is this a normal behaviour? We need when clicking on "Add another Item" to get empty field.
Any help is appreciated.
Thank you in advance!
Comment #15
martin_qHi martichka5,
You've added a comment to an issue that is already marked closed. It looks to me that you are describing a new and separate problem, so it wouldn't be appropriate to re-open this issue for that. It sounds like you've found a legitimate bug, though, and I'd encourage you to open a new issue, which will then have a good chance of being seen and addressed. :)
Comment #16
martichka5 commentedThank you @martin_q!
I will open a new issue.
Comment #17
mrpauldriver commentedBe good to see this committed to a 7.x-1.6 release