Skip to content
Snippets Groups Projects
Commit 2136b599 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

Merge branch 'negativpid' into 'master'

Fix negativ pid when doing a positioned insert

If you insert a content element (or a page) at a concrete position
f.e. after content element 15 the value in $row['pid'] is -15.

But in $this->data we already have the real pid, so we can just use it.

See merge request !7
parents aa32d055 8b2f0976
No related branches found
No related tags found
No related merge requests found
......@@ -224,7 +224,7 @@ class RichTextElement extends AbstractFormElement {
$this->resultArray = $this->initializeResultArray();
$this->defaultExtras = BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']);
$this->pidOfPageRecord = $table === 'pages' && MathUtility::canBeInterpretedAsInteger($row['uid']) ? (int) $row['uid'] : (int) $row['pid'];
$this->pidOfPageRecord = $this->data['effectivePid'];
BackendUtility::fixVersioningPid($table, $row);
$this->pidOfVersionedMotherRecord = (int) $row['pid'];
$this->vanillaRteTsConfig = $backendUser->getTSConfig('RTE', BackendUtility::getPagesTSconfig($this->pidOfPageRecord));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment