- Issue created by @jkamizato
Removing item reference, mess up child of other items.
Create 3 content types: A, B, C
A has field reference to B (multiple), and B has field reference to C (multiple)
Inside content type A, create content like this:
- Item1
-- Subitem1
-- Subitem2
-- Subitem3
-Item2
-- Subitem1
-- Subitem2
-Item3
-- Subitem1
-Item4
-- Subitem1
-- Subitem1
-- Subitem1
-- Subitem1
Test1: If you delete item1, other item mess up:
-Item2
-- Subitem1
-- Subitem2
-- EMPTY
-Item3
-- Subitem1
-- EMPTY
-Item4
-- Subitem1
Note: Lost last items from item4.
Test2: (Refresh page) Remove item2:
- Item1
-- Subitem1
-- Subitem2
-- Subitem3
-Item3
-- Subitem1
-- EMPTY
-Item4
-- Subitem1
When removing a item, keep the correct number of subitems in other items.
Note: Looks like when you remove a item, subitems bellow get the number of subitems above, not itself.
Note: I've tested in 1.0 version and 3.0 and version (using this patch
https://www.drupal.org/project/inline_entity_form/issues/3226873 →
to add multiple item)
Active
3.0
Code