[BUGFIX] Do not provide non selectable columns in colPos selector 69/50169/2
authorHelmut Hummel <info@helhum.io>
Mon, 10 Oct 2016 18:04:15 +0000 (20:04 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 14 Oct 2016 09:43:15 +0000 (11:43 +0200)
When a backend layout is active for a page, editing a content
element will have the "columns" of this layout selectable
in the "colPos" drop down selector.

Now this select box does not include the backend layout columns without
assigned colPos any more, because these are not meant to have content
anyway and selecting such a column would put the content element into column
with colPos 0

Resolves: #78223
Releases: master, 7.6
Change-Id: I7b44cbe26adabc4028ee874bea5fa63f7127d118
Reviewed-on: https://review.typo3.org/50169
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Markus Sommer <markussom@posteo.de>
Tested-by: Markus Sommer <markussom@posteo.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>

index 81d34f5..f91c637 100644 (file)
@@ -364,6 +364,9 @@ class BackendLayoutView implements \TYPO3\CMS\Core\SingletonInterface
                 foreach ($backendLayoutData['__config']['backend_layout.']['rows.'] as $row) {
                     if (!empty($row['columns.'])) {
                         foreach ($row['columns.'] as $column) {
+                            if (!isset($column['colPos'])) {
+                                continue;
+                            }
                             $backendLayoutData['__items'][] = [