z3c.form: deleting subitems in a very complex form

Hi all,

I'm working with a complex z3c.form 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 that is 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.

Any clues? If this is a bug I'm not sure if is in z3c.form or in Plone components.

I guess I can't help, but I'd love to see the code - I've never done subforms with z3c.form, but it sounds like a powerful feature...

It's probably a z3c.form issue. It's said in subform documentation that its implementation in z3c.form is opinionated and may not be comprehensive. Probably, at that point, data is wrapped in a way that the deletion targets some wrapper instead of the "real" data. Try to debug related widgets in z3c.form (and try not to be scared by how those are implemented...).

@thet when they works (and normally they did) they save a lot of your developing time.

I think I'll open an issue about it, no time for looking deeper.