Bug #67276
closed
Backend layout without configured colPos crashes page module
Added by Rüdiger Marwein over 9 years ago.
Updated about 6 years ago.
Category:
Backend User Interface
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
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.
- Status changed from New to Needs Feedback
- Target version deleted (
7.3 (Packages))
Is your mysql running in strict mode? If so, please disable that.
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.
Ok, so without colPos you get this error? Does this also happen with latest 7.4?
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?
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
}
}
}
}
}
- 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.
- Target version set to Candidate for patchlevel
- Status changed from New to Under Review
- Assignee set to Benni Mack
- Target version changed from Candidate for patchlevel to next-patchlevel
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF