Problem/Motivation

We observe orphaned and misattributed elements when deleting elements. The causes are not fully clear yet, this issue should provide a place to investigate.

Ways for creating malformed data

- (1): Deleting an element and then restoring it with CTRL+Z / Undo causes the element to be still be marked as deleted.
- (2): Moving an element to a different parent creates two patch requests. If one of them fails, the stored data is incorrect (wrong
parent on moved element or wrong children list on source or target element)
- (3): Deleting elements did not properly mark them as deleted and didn't mark them as unpublished.

Proposed resolution

- (1): On restoring an element, set both deleted and published status to 0 and disable redo/undo.
- (2): Only call target element by checking childrens list before saving component and create data consistency on backend by altering source element / moved element.
- (3): Properly adress the field value of "deleted" and set "status" to 0 on deletion.

Remaining tasks

User interface changes

- Undo/redo is no longer avaiable (as intended by Design).

API changes

- Deleted elements are also marked as unpublished.
- The debugger now can also handle styles properly and deletes or unpublishes as well

Data model changes

None

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pvbergen created an issue. See original summary.

pvbergen’s picture

Issue summary: View changes

  • pvbergen committed 9d7be87f on 3.0.x
    Resolve #3409003 "Deleting elements may 3.0.x"
    
pvbergen’s picture

Status: Active » Fixed

  • pvbergen committed bd849c11 on misc/cleanup_performance
    Resolve #3409003 "Deleting elements may"
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.