Bug #98181
closedUndefined in array key in workspaceOL method
100%
Description
When using EXT:container in TYPO3 11.5.14 with enabled (not live) workspaces, the content element properties does not show up, instead this exception occures:
PHP Warning: Undefined array key "pid" in /www/htdocs/***/vendor/typo3/cms-backend/Classes/Utility/BackendUtility.php line 3432
This line is the following:
// When a moved record is found the "PID" value contains the newly moved location // Whereas the _ORIG_pid field contains the PID of the live version $wsAlt['_ORIG_pid'] = $row['pid'];
But, it can happen that the key "pid" is not set in $row.
When wrapping a isset($row['pid'])
condition around, the exception does not appear anymore.
The workspaceOL method has been called by: /vendor/typo3/cms-backend/Classes/Form/FormDataProvider/AbstractItemProvider.php line 371
Updated by Oliver Hader over 2 years ago
- Category changed from Workspaces to FormEngine aka TCEforms
$queryBuilder = $this->buildForeignTableQueryBuilder($result, $fieldName);
uses BackendUtility::getCommonSelectFields($foreignTableName, $foreignTableName . '.')
in order to get the corresponding database QueryBuilder
instance - however, this utility function does NOT add pid
as field, which leads to the mentioned scenario.
Updated by Gerrit Code Review over 2 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75532
Updated by Gerrit Code Review about 2 years ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75532
Updated by Armin Vieweg about 2 years ago
I discovered that calling ContentObjectRenderer->getTreeList()
will also cause a similar exception:
PHP Warning: Undefined array key "pid" in /www/htdocs/abc123/vendor/typo3/cms-core/Classes/Domain/Repository/PageRepository.php line 1693
When I add "pid" to select fields, the error is gone, but the result is not respecting pages which are not located in the current workspace, but are published.
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75532
Updated by Gerrit Code Review over 1 year ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75532
Updated by Gerrit Code Review over 1 year ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75532
Updated by Christian Kuhn over 1 year ago
confirmed. we stumbled upon that with a tt_content CE having a field to select pages. in workspaces the overlay then crashes since 'pid' is missing.
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80042
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80043
Updated by Georg Ringer over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 97cdb9ff3f5efc7ac711dd1b5b850c04d3405ce7.
Updated by Benni Mack over 1 year ago
- Related to Bug #101443: Exception 'Undefined array key "pid"' after moving content in a workspace added