Issue Bug Closed

#100504processCmdmap_discardAction does not hand in DataHandler object (was: Deleting a container-element does not delete the childs of the container)

Kurt Gusbeth 04/06/23, 09:57 updated 06/17/25, 13:24

Description

When I use the container-extension
https://extensions.typo3.org/extension/container
and create a container-element and then add some normal elements to it, everything is OK.
But when I am in a Workspaces-mode and then delete this container, only the container-element will be deleted.
The childs of the containter will not be deleted when I am in the workspaces-mode.
When I am in the live-workspace, every child of a container will be deleted too.
In the workspace-mode, the childs of a deleted container will be shown at the bottom of the page under the “Unused” column.
Because this happens only in the workspace-mode, this must be a bug in the workspaces-extension.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 4

  1. Georg Ringer commented and changed status New Rejected <span data-processor="relativetime" data-value="2023-04-12T04:59:06+00:00" > 04/12/23, 04:59 </span>

    thanks for reporting the issue. I am closing this because I guess it is more related to ext:container.

    I added your issue at the proper issue tracker https://github.com/b13/container/issues/387

  2. Benni Mack commented and changed subject Deleting a container-element does not delete the childs of the container processCmdmap_discardAction does not hand in DataHandler object (was: Deleting a container-element does not delete the childs of the container) status Rejected Accepted <span data-processor="relativetime" data-value="2023-06-04T19:45:15+00:00" > 06/04/23, 19:45 </span>

    I think we should keep this one open, as the processCmdmap_discardAction() does not hand in the DataHandler instance currently, which should be adapted in Core.

  3. Christian Kuhn commented and changed status Accepted Closed <span data-processor="relativetime" data-value="2025-06-17T13:24:59+00:00" > 06/17/25, 13:24 </span>

    Actually, I think we should close here again for now: The issue is taken care within ext:container, which finds affected records and feeds them to a fresh DH instance process_cmdmap(). While this is for sure not optimal, discard() within DH is protected, and that’s a good thing as well. We should also probably not change existing hooks to add “parent” since this increases technical debt.

    For the time being, I’d say the issue has been taken care within ext:container, and that’s fine. In core, we should rather substitute the hooks with events, but that can only happen after we fixed a lot of other state within DataHandler and created a proper API to declare which parts are public API and which aren’t. And this can probably only happen after we’ve split DH into smaller parts. This is much more work than the current suggestion to add “parent” to the hook, which only adds debt. As such, I think we shouldn’t just add “parent” if there is no true pressure that can’t be solved differently for now.