Bug #67276

Backend layout without configured colPos crashes page module

Added by Rüdiger Marwein over 5 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend User Interface
Target version:
Start date:
2015-06-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

Schermata 2015-09-08 alle 12.11.59.png (20.1 KB) Schermata 2015-09-08 alle 12.11.59.png Riccardo De Contardi, 2015-09-08 12:13
#1

Updated by Jan Helke over 5 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.

#2

Updated by Jan Helke over 5 years ago

  • Status changed from New to Needs Feedback
#3

Updated by Markus Klein over 5 years ago

  • Target version deleted (7.3 (Packages))
#4

Updated by Markus Klein over 5 years ago

Is your mysql running in strict mode? If so, please disable that.

#5

Updated by Rüdiger Marwein over 5 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.

#6

Updated by Alexander Opitz about 5 years ago

Ok, so without colPos you get this error? Does this also happen with latest 7.4?

#7

Updated by Riccardo De Contardi about 5 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?

#8

Updated by Rüdiger Marwein about 5 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
                }
            }
        }
    }
}

#9

Updated by Daniel Goerz about 5 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.

#10

Updated by Riccardo De Contardi about 5 years ago

  • Target version set to Candidate for patchlevel
#11

Updated by Gerrit Code Review almost 5 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

#12

Updated by Benni Mack almost 5 years ago

  • Assignee set to Benni Mack
  • Target version changed from Candidate for patchlevel to next-patchlevel
#13

Updated by Gerrit Code Review almost 5 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

#14

Updated by Gerrit Code Review almost 5 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

#15

Updated by Georg Ringer almost 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#16

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF