Skip to content
This repository was archived by the owner on May 4, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Classes/Backend/LayoutSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ public function init($pageId, $typoScriptSetup = array())
{
$this->setDatabaseConnection($GLOBALS['TYPO3_DB']);
$this->setLanguageService($GLOBALS['LANG']);

// new element inserted after existing one
if(\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($pageId) && $pageId < 0) {
$pidRec = BackendUtility::getRecord('tt_content', abs($pageId), 'pid');
$pageId = is_array($pidRec) ? (int)$pidRec['pid'] : 0;
}

$pageId = (strpos($pageId, 'NEW') === 0) ? 0 : (int)$pageId;
$this->loadLayoutSetup($pageId);
foreach ($this->layoutSetup as $key => $setup) {
Expand All @@ -87,6 +94,7 @@ public function init($pageId, $typoScriptSetup = array())
return $this;
}


/**
* setter for layout setup
*
Expand Down