Closed (works as designed)
Project:
Field Remove Item
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Aug 2012 at 21:22 UTC
Updated:
21 Aug 2014 at 18:49 UTC
Jump to comment: Most recent
Comments
Comment #1
FranciscoLuz commentedHi,
The items being unset in this case are only those that had been removed before a failed form validation occurs.
"All" in this sense does not mean effectively all the items in the field but the user selected ones.
Of course, I am not saying that your assertion is not correct, that might be the cause, although I find it unlikely to be the case.
Try to comment out the line 80 (unset statement) and see if that behaviour still applies.
Comment #2
FranciscoLuz commentedAh!
Another thing that I should state is that this module is not suppose to act on field collection fields because field collection has its own remove button.
Check out the code on line 15, it excludes field collection.
I haven't got the time to investigate that in depth right now but you could test it yourself by disabling this module and see if it has any impact on what you are experiencing whatsoever.
Comment #3
charlie-s commentedWhen I disable this module the field_collection items are not touched. When I enable this module again and save the node edit form of a node that contains field_collection items, they are deleted completely from the database.
This is not true for hidden field_collection widgets, and I suspect this is where the problem lies.
Comment #4
FranciscoLuz commentedI see.
I wont have time to fix it right now but apparently it is only a matter of finding out what value in the $element array says it is a hidden field and then add a exclusion condition in the "if" statement at line 14.
I will look into this as soon as I can.
Comment #5
pcambraCould you try the module with the latest changes and let me know if this has still issues?
If so, how to reproduce this behavior.
Comment #6
pcambraMarking this as closed, feel free to reopen after checking the question above.