zopefoundation / z3c.form

An advanced form and widget framework for Zope 3
Other
8 stars 39 forks source link

Can't delete items from a 2-deep level subform #30

Open keul opened 9 years ago

keul commented 9 years ago

Originated from https://community.plone.org/t/z3c-form-deleting-subitems-in-a-very-complex-form/906


I'm working on a complex z3c.form-base Plone controlpanel and I'm finding an issue deleting 2nd level subitems

In two words: I've a main interface IConfiguration1, one of its fields (let say field1 is a tuple of a value_type IConfiguration2. This is a know situations that already worked in a lot of other cases: z3c.form display a subform where you can add/edit/remove submitems.

This time in the IConfiguration2 I've another tuple field (field2) composed by items of type IConfiguration3.

I never done a so complex form before (and probably is not a good idea)... however: it works normally, I can add 2nd level subitems, edit them, but I can't delete.

When I try to delete one item from the field2 set, the UI will reloads the same page with the item still there; the only difference is the selection checkbox I checked before is now disabled.

The only way that works is to delete the super-item (one of the field1 values) and re-add all.

Apart of that: all works normally.

idgserpro commented 5 years ago

@keul have you come to any conclusion as to why it doesn't work?

keul commented 5 years ago

@idgserpro hell no!

IIRC I tried to debug this but z3c.form source was (is?) so complex that can reach singularity.