Index: cm1/index.php =================================================================== --- cm1/index.php (revision 28850) +++ cm1/index.php (working copy) @@ -1731,8 +1731,13 @@ $optDat = array_reverse($optDat); } - // Add options for "samelevel" elements: - $sameLevelElements = $this->markupObj->elParentLevel[$lastEl['parent']]; + /** + * Add options for "samelevel" elements - + * If element has an id the "parent" is empty, therefore we need two steps to get the elements (see #11842) + */ + $parentElement = strlen($lastEl['parent']) ? $lastEl['parent'] : $this->markupObj->elParentLevel[$lastEl['parent']][0]; + $sameLevelElements = $this->markupObj->elParentLevel[$parentElement]; + if (is_array($sameLevelElements)) { $startFound=0; foreach($sameLevelElements as $rEl) {