Skip to content
Snippets Groups Projects

Fix negativ pid when doing a positioned insert

Merged Marco Huber requested to merge mhuber84/tinymce4_rte:negativpid into master
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
  • 8b2f0976
    If you insert a content element (or a page) at a concrete position
    f.e. after content element 15 the value in ['pid'] is -15.
    
    But in ->data we already have the real pid, so we can just use it.
@@ -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));
Loading