I use field collection on a specific content type.
And on hook_node_validate function, I check whether input values are correct or not.
The problem goes like this.

  1. If I click remove button without saving node form, It works perfectly even though input values are wrong.
  2. But If I type some wrong values on field collection field, and click save button on node form, hook_node_validate sets errors on the form as expected.
  3. After that If I click remove button, then the item is not removed and It shows earlier form error that says you have wrong values. I think despite the fact that the values are wrong, remove button should work properly because validation is not required for remove.

Is there anyone facing same problem or solved the issue?

Comments

bradallenfisher’s picture

Issue summary: View changes

Yes... I have nested fields and really can't even get the validation to work properly. However, the issue at hand is that the remove button doesn't remove the item(s). These nodes have been saved. Upon re-editing the remove feature just spins the ajax wheel and does nothing.

tim.plunkett’s picture

Status: Active » Closed (duplicate)
Related issues: +#1675522: Remove button broken if form is rebuilt (via ajax or failed validation)

I've found many different scenarios that all seem to be incarnations of the same bug. I'm marking this as a duplicate to try and focus efforts.
#1675522: Remove button broken if form is rebuilt (via ajax or failed validation)