Bug #64176
closedgenerateTtContentDataArray(null) breaks backend
100%
Description
The commit ebdd15ea62115329eb324ac29e5400e5806c01bf (4.5.35) breaks the page module in case the attribute $rowArr of the new function generateTtContentDataArray() is null instead of an array.
Unfortunately I haven't had any opportunity yet to debug it any further to find out why the $rowArr is null in my case. But maybe Nicole already knows why ;-)
Files
Updated by Anonymous almost 10 years ago
- File tx_cms_layout.patch tx_cms_layout.patch added
Ok, here are my debugging results.
In our case $this->tt_contentConfig['cols'])
was containing an empty string which resulted in an 1 item containing array $cList = array(0 => '')
after being exploded. $this->tt_contentConfig['cols'])
was empty because of a TSconfig snippet mod.SHARED.colPos_list = 99
, which removed all the tt_content column in page module. (Background: other tables have been added to page view, so we wouldn't need any tt_content columns!)
Up until 4.5.35 this work just fine. In order to get this working again I suggest to use t3lib_div::trimExplode()
instead of explode()
. See attached patch file for 4.5.x.
Updated by Oliver Hader almost 9 years ago
- Status changed from New to Needs Feedback
Is that still an issue with current 6.2 and 7.6 installations?
Updated by Jigal van Hemert over 8 years ago
- Status changed from Needs Feedback to Accepted
By reading the code the change from explode to trimExplode seems valid. explode(',', '') results in array(0 => '') (an array with the string that should be exploded)
This is not what the rest of the code expects. An empty array is a better value as it will prevent foreach loops from doing anything.
Updated by Nicole Cordes over 8 years ago
Problem was solved in 7.4.0 with patch https://review.typo3.org/41768/
Updated by Gerrit Code Review over 8 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49000
Updated by Nicole Cordes over 8 years ago
Following PageTS I needed to reproduce the error:
mod.SHARED.colPos_list = 99 mod.web_layout.tt_content.colPos_list = 99 TCEFORM.tt_content.colPos.removeItems = 0, 1, 2, 3
Updated by Nicole Cordes about 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 44949dff5e24e7e292bbe820a41b2e29b930936d.