Bug #101443
closedException 'Undefined array key "pid"' after moving content in a workspace
0%
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.
Files
Updated by Ernesto Baschny over 1 year ago
- Related to Task #92497: Remove move placeholders added
Updated by Ernesto Baschny over 1 year ago
The mentioned patch attached now.
@Benni Mack I mention you, because you are the original author of the breaking change. Maybe you have some idea?
Updated by Benni Mack over 1 year ago
Ernesto Baschny wrote in #note-2:
The mentioned patch attached now.
@Benni Mack I mention you, because you are the original author of the breaking change. Maybe you have some idea?
See https://review.typo3.org/c/Packages/TYPO3.CMS/+/80042 and 98181 - problem is solved when you update.
Updated by Benni Mack over 1 year ago
- Related to Bug #98181: Undefined in array key in workspaceOL method added
Updated by Ernesto Baschny over 1 year ago
- Status changed from New to Closed
Amazing, hadn't seen it before. Also crazy that Georg made a patch that looks exactly the same as me one year ago and it was merged and released just last week.
Thanks @Benni Mack and @Georg Ringer!