Remove item reference, mess up third level of other items

Created on 28 February 2024, 4 months ago
Updated 6 March 2024, 4 months ago

Problem/Motivation

Removing item reference, mess up child of other items.

Steps to reproduce

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

Proposed resolution

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)

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡§πŸ‡·Brazil jkamizato

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024