From 25f37d6575dc47b5957417f376150e8acdedf21c Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Wed, 9 Aug 2023 12:29:18 +0200 Subject: [PATCH] Use unescaped node name for missing children --- application/controllers/ProcessController.php | 2 +- library/Businessprocess/BpConfig.php | 2 +- library/Businessprocess/BpNode.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/controllers/ProcessController.php b/application/controllers/ProcessController.php index c735af2..0cfced2 100644 --- a/application/controllers/ProcessController.php +++ b/application/controllers/ProcessController.php @@ -448,7 +448,7 @@ class ProcessController extends Controller protected function prepareMissingNodeLinks(HtmlElement $ul): void { - $missing = $this->bp->getMissingChildren(); + $missing = array_keys($this->bp->getMissingChildren()); if (! empty($missing)) { $missingLinkedNodes = null; foreach ($this->bp->getImportedNodes() as $process) { diff --git a/library/Businessprocess/BpConfig.php b/library/Businessprocess/BpConfig.php index 3e652e9..e2fd5c9 100644 --- a/library/Businessprocess/BpConfig.php +++ b/library/Businessprocess/BpConfig.php @@ -701,7 +701,7 @@ class BpConfig $msg = $this->isFaulty() ? sprintf( t('Trying to import node "%s" from faulty config file "%s.conf"'), - $name, + self::unescapeName($name), $this->getName() ) : sprintf(t('Trying to access a missing business process node "%s"'), $name); diff --git a/library/Businessprocess/BpNode.php b/library/Businessprocess/BpNode.php index 67a2602..419f836 100644 --- a/library/Businessprocess/BpNode.php +++ b/library/Businessprocess/BpNode.php @@ -275,11 +275,11 @@ class BpNode extends Node foreach ($this->getChildren() as $child) { if ($child->isMissing()) { - $missing[$child->getName()] = $child; + $missing[$child->getAlias()] = $child; } foreach ($child->getMissingChildren() as $m) { - $missing[$m->getName()] = $m; + $missing[$m->getAlias()] = $m; } }