Bug #67276
closedBackend layout without configured colPos crashes page module
100%
Description
I've just created a simple backend layout in version 7.2 and chose it in the page properties.
Now the "Page" module crashes. No output.
The error in the log is:
PHP Catchable fatal error: Argument 1 passed to TYPO3\CMS\Backend\View\PageLayoutView::generateTtContentDataArray() must be of the type array, null given, called in C:\...\typo3\sysext\backend\Classes\View\PageLayoutView.php on line 474 and defined in C:\...\typo3\sysext\backend\Classes\View\PageLayoutView.php on line 1862
Also tried it with current master branch. Same issue.
I'm on Windows 8.1, Apache 2.4.10, MySQL 5.6.21
Files
Updated by Jan Helke over 9 years ago
Sorry, but I can't reproduce the problem. I tried the following BE layout on master and it worked quite well
backend_layout { colCount = 2 rowCount = 2 rows { 1 { columns { 1 { name = Header colspan = 2 colPos = 0 } } } 2 { columns { 1 { name = Content colPos = 1 } 2 { name = Sidebar colPos = 2 } } } } }
Mint Linux, Apache 2.4.7, MySQL 5.5.43 here.
Maybe you could try the layout or somebody with a Windows System has to check.
Updated by Markus Klein over 9 years ago
- Target version deleted (
7.3 (Packages))
Updated by Markus Klein over 9 years ago
Is your mysql running in strict mode? If so, please disable that.
Updated by Rüdiger Marwein over 9 years ago
Aha, the error appears due to a non-obvious configuration mistake.
When building the grid, the user is not forced to enter column numbers - which implies an automatic numbering or something.
It can be saved and used without further notification.
The above mentioned PHP Fatal Error is the result of such a columnnumber-less configuration.
Updated by Alexander Opitz over 9 years ago
Ok, so without colPos you get this error? Does this also happen with latest 7.4?
Updated by Riccardo De Contardi over 9 years ago
I have performed the following test with 7.5.0-dev (latest master)
1) create a BE layout with the following config:
backend_layout { colCount = 1 rowCount = 3 rows { 1 { columns { 1 { name = my page col colPos = 0 } } } 2 { columns { 1 { name = my other col colPos = 2 } } } 3 { columns { 1 { name = texxx } } } } }
as you can see one column has no colPos
2) assign it to all pages
3) creating a page, the page module shows what is in the attached file
should I perform a different test or this could be closed?
Updated by Rüdiger Marwein about 9 years ago
The error is reproducable when not a single colPos is given.
Crashes:
backend_layout { colCount = 2 rowCount = 1 rows { 1 { columns { 1 { name = 0x0 } 2 { name = 1x0 } } } } }
Does not crash:
backend_layout { colCount = 2 rowCount = 1 rows { 1 { columns { 1 { name = 0x0 colPos = 1 } 2 { name = 1x0 } } } } }
Updated by Daniel Goerz about 9 years ago
- Subject changed from Backend layout crashes page module to Backend layout without configured colPos crashes page module
- Status changed from Needs Feedback to New
- Priority changed from Must have to Should have
Although a backend layout without configured colPos does not make much sense, a fatal is of course not the right way to indicate a configuration error.
Updated by Riccardo De Contardi about 9 years ago
- Target version set to Candidate for patchlevel
Updated by Gerrit Code Review about 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45146
Updated by Benni Mack about 9 years ago
- Assignee set to Benni Mack
- Target version changed from Candidate for patchlevel to next-patchlevel
Updated by Gerrit Code Review almost 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45146
Updated by Gerrit Code Review almost 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45146
Updated by Georg Ringer almost 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 0b0bb11c6ea3c5e11ff1803e9b072a56b09128c6.