If I use the remove item from list action to remove an item from the middle of a multi-value field then the delta values for the field items end up non-contiguous.

I'm not sure if this is really a bug—I can't seem to find any firm info on wether the delta values are allowed to have gaps, but it certainly causes some problems for me in views if there are.

Comments

fago’s picture

Component: Rules Core » Rules Engine
Priority: Normal » Minor

I don't think it should create an issues. I think the field-API stream-lines the delta value in its form-code, but when saved programmatically. Probably this would be best fixed directly in core to stream-line the values before saving them. So maybe create a core-issue for it.

zephirus’s picture

Component: Rules Engine » Rules Core

I have a problem when "Remove an item from a list" action is used. I have two lists, A and B filled with users from my site.

List A:
Peter
Tom

List B:
Sam

I have a flag action. When I flag the node, I have the actions to remove my username from list A and add it to the list B.

If I'm logged as Tom (the last user from list A), I get the correct behaviour (List A with Peter/List B with Sam and Tom)
BUT, If I'm logged as Peter (not the last user from list A), I get list A empty and List B with Sam and Peter)

So, only when I remove the last item from the list, it works, removing every other user gives the error above.

My lists are views references (don't know if it's usefull information...)