#101443Exception 'Undefined array key "pid"' after moving content in a workspace
Description
Preconditions:
- Any TYPO3 v11 (or later) installation
- PHP 8.x
- Workspaces extension enabled
- no further extensions or configuration required
How to reproduce:
- Create a Workspace
- Create a page
- Add two content elements (in LIVE mode)
- Switch to the workspace
- Drag & drop the first element after the second element – page will be marked as “modified” in the page tree
- Try to add a new content element between or after these elements
You get this exception:
PHP Warning: Undefined array key “pid” in /app/packages/typo3/typo3/sysext/backend/Classes/Utility/BackendUtility.php line 3445
Background
This bug was introduced with https://review.typo3.org/c/Packages/TYPO3.CMS/+/65797
A potential workaround is to add the “pid” field to the list of `BackendUtilities::getCommonSelectFields` (see attached patch, which we will deploy in production to our customer to get around the problem for now). But maybe this is just hiding the real “problem”. The @todos in `BackendUtilities::workspaceOL` give me a vibe that something could be fishy around here.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.