#107559Deleting a page while editing a content element on that page produces error
Description
If you are editing a content element on a page and then delete that page from the pagetree the backend will still try to open that content element. Because this fails an error is displayed:
Record with uid xxxxxx from table tt_content not found dit form could not be loaded The edit form could not be loaded for the requested records. This might be due to insufficient permissions.
Perhaps the delete action in the page tree should first check if the edit form is open with an element of that page? Or it could perhaps cancel the edit action so the message to select a page is displayed.
The current behaviour is a bit confusing for editors, especially the part about permissions.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] Deleting a page while editing a content element on that page produces error Resolves: #107559 Releases: main
History 1
-
Jigal van Hemert commented <span data-processor="relativetime" data-value="2026-11-03T08:42:52+00:00" > 11/03/26, 08:42 </span>
The same issue occurs if you delete a page with the context menu of the pagetree while you’re editing that page (the page record). In this case the error says (of course) that the pages record couldn’t be found with the same confusing message about a possible issue with the rights to that page.
Steps to reproduce this case:The combining issue is that if you delete pages with the context menu of the pagetree the main edit area will be refreshed. If the affected pages record or another record on that particular page is currently being edited it can’t be found anymore (because the page and all records on that page have been deleted).
A logical outcome for the editor would be that there is a message that page X and all its content have been removed and that the open module returns to the state when no page/record have been selected.