objectManager: Show a note if a parent entry is missing
This commit is contained in:
@@ -1217,6 +1217,11 @@ class ObjectManager
|
||||
if($sLinkText == 'default')
|
||||
{
|
||||
$oParent = $oObject->objectGetParent();
|
||||
if(!$oParent)
|
||||
{
|
||||
echo html_note('Failed to find parent entry', 'No parent entry could be found, even though it is supposed to exist.');
|
||||
} else
|
||||
{
|
||||
$oParentOM = new objectManager(get_class($oParent), '', $oParent->objectGetId());
|
||||
$sClassName = $oParentOM->getOptionalSetting('objectGetClassDisplayName', false);
|
||||
if($sClassName)
|
||||
@@ -1224,6 +1229,7 @@ class ObjectManager
|
||||
else
|
||||
$sLinkText = 'Move to another parent entry';
|
||||
}
|
||||
}
|
||||
echo "<a href=\"".$this->makeUrl("showChangeParent", $this->iId,
|
||||
"Move to another parent entry")."\">$sLinkText</a>\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user