Bug #35319
Error when creating new page
| Status: | Resolved | Start date: | 2012-03-28 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | 2.1.14 | |||
| TYPO3 Version: | 4.5 | PHP Version: | ||
| Votes: | 1 (View) |
Description
When I in the backend click on a page and use the page menu to create a new page - an error occurs.
I click on the page -> Page actions -> New -> then select placement of the page in the menu -> then select template -> then the error comes:
Fatal error: Cannot use string offset as an array in /some/path/typo3conf/ext/multicolumn/hooks/class.tx_multicolumn_tcemain.php on line 43
This only happens from that page menu - not when I use the "normal way" of creating a new page.
I tested this in TYPO3 4.5.11 and 4.5.13 both give this error.
Associated revisions
Fixed bug #35319: possible PHP errors in the TCEmain hook
Fixed bug #35319: possible PHP errors in the TCEmain hook
History
Updated by Vasile Oancea about 1 year ago
In TYPO3 4.5.14 same error.
Solution:
public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray, t3lib_TCEmain $pObj) {
$GPvar = t3lib_div::_GP('cmd');
if(is_array($GPvar)) {
// element gets localized
$localizeToSysLanguageUid = intval($GPvar['tt_content'][$fieldArray['t3_origuid']]['localize']);
if($status == 'new' && $fieldArray['CType'] == 'multicolumn' && !empty($localizeToSysLanguageUid)) {
$this->pObj = clone $pObj;
//get new uid
$multiColCeUid = $this->pObj->substNEWwithIDs[$id];
//has container children?
$parentUid = !empty($fieldArray['l18n_parent']) ? $fieldArray['l18n_parent'] : key($GPvar['tt_content']);
if(!empty($parentUid)) {
$containerHasChildren = tx_multicolumn_db::containerHasChildren($parentUid);
if($multiColCeUid && $containerHasChildren) {
$this->localizeMulticolumnChildren($containerHasChildren, $multiColCeUid, $localizeToSysLanguageUid);
}
}
//reset rempat stack record for multicolumn item (prevents double call of processDatamap_afterDatabaseOperations)
unset($pObj->remapStackRecords['tt_content'][$id]);
}
}
}
Updated by Dmitry Dulepov 4 months ago
- Status changed from New to Needs Feedback
- TYPO3 Version set to 4.5
I am unable to reproduce this. Does this still happen?
Updated by Jesper Goos 4 months ago
I have not experienced this problem for some time. I guess it if fixed. Thanks!
Updated by Dmitry Dulepov 3 months ago
- Status changed from Needs Feedback to Resolved
- Target version set to 2.1.14
I added preventive checks for this issue in r72630. Just in case :)