Bug #96560
closedWrong sorting of rows in backend layout in TYPO3 11.5
100%
Description
If you reuse an existing backend layout and modify it in Page TSconfig, then the rows were sorted correctly by its index number in TYPO3 10.4. In TYPO3 11.5, this doesn't work any more.
Example page TSconfig
mod.web_layout.BackendLayouts { Test { title = Test config.backend_layout { colCount = 1 rowCount = 1 rows { 1.columns.1 { name = Content colPos = 0 } } } } TestII < .Test TestII { title = Test II config.backend_layout { rowCount = 2 rows { 2 < .1 1 > 1.columns.1 { name = Header colPos = 1 } } } } }
This results in a PageTSconfig array like this:
[ '2' => [ 'colPos' => 0, 'name' => 'Content', ], '1' => [ 'colPos' => 1, 'name' => 'Header', ], ];
In TYPO3 10.4, the backend layout is rendered in \TYPO3\CMS\Backend\View\PageLayoutView
in the method public function getTable_tt_content($id)
:
for ($row = 1; $row <= $rowCount; $row++) { $rowConfig = $backendLayout['__config']['backend_layout.']['rows.'][$row . '.'];
With this for
loop, the first row is the "Header" row and the second row is the "Content" row.
In TYPO3 11.5, the backend layout is rendered in \TYPO3\CMS\Backend\View\Drawing\BackendLayoutRenderer
in the method public function getGridForPageLayoutContext(PageLayoutContext $context): Grid
:
foreach ($context->getBackendLayout()->getStructure()['__config']['backend_layout.']['rows.'] ?? [] as $row) { $rowObject = GeneralUtility::makeInstance(GridRow::class, $context)
With this foreach
loop, the first row is the "Content" row and the second row is the "Header" row. This ignores that the "Header" row has the lower index key in the page TSconfig.
Files
Updated by Gerrit Code Review almost 3 years ago
- Status changed from New 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/+/73047
Updated by Gerrit Code Review almost 3 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/+/73047
Updated by Gerrit Code Review almost 3 years ago
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/+/73054
Updated by Gerrit Code Review almost 3 years 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/+/73047
Updated by Gerrit Code Review almost 3 years ago
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/+/73056
Updated by Gerrit Code Review almost 3 years 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/+/73047
Updated by Gerrit Code Review almost 3 years 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/+/73047
Updated by Gerrit Code Review almost 3 years ago
Patch set 6 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/+/73047
Updated by Gerrit Code Review almost 3 years 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/+/73152
Updated by Georg Ringer almost 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ed28a28aa724de4512ddbdc97fbf0cd313438407.