Issue Bug Closed

#86010Creation of Content BELOW another Content Element leads to Exception

Daniel Goerz 08/28/18, 15:41 updated 10/02/18, 10:30

Description

On current master it is not possible to insert content below other content (creating a content element at the topmost position works).

This is because in the EditDocumentController the PID of the current page is ecpected to be passed to getLanguages() where it is used for SiteMatcher->matchByPageId($id)

However, if one inserts a content element BELOW another content element no longer is the PID passed but the negative UID of the above Content Element instead.

if ($insertRecordOnTop) {
    $relatedPageId = $nRec['pid'];
} else {
    $relatedPageId = -$nRec['uid'];
}

In such a case the SiteMatcher fails to find a Site (or PseudoSite) and throws the Exception: #1534710048: No pseudo-site found in root line of page -<uid>

Reviews 1