From 29da5701ee240c3ddc372302f48a59061180c45e Mon Sep 17 00:00:00 2001 From: Benn Oshrin Date: Sat, 24 May 2025 16:12:37 -0400 Subject: [PATCH] Additional fix for CFM-375 --- .../src/Controller/ApiSourceEndpointsController.php | 2 +- .../ApiConnector/templates/ApiSourceEndpoints/fields.inc | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/availableplugins/ApiConnector/src/Controller/ApiSourceEndpointsController.php b/app/availableplugins/ApiConnector/src/Controller/ApiSourceEndpointsController.php index 86ad2e659..35885ec48 100644 --- a/app/availableplugins/ApiConnector/src/Controller/ApiSourceEndpointsController.php +++ b/app/availableplugins/ApiConnector/src/Controller/ApiSourceEndpointsController.php @@ -50,7 +50,7 @@ class ApiSourceEndpointsController extends StandardPluginController { public function beforeRender(\Cake\Event\EventInterface $event) { $vv_obj = $this->viewBuilder()->getVar('vv_obj'); - if(!empty($vv_obj)) { + if(!empty($vv_obj->api_source_id)) { $apiSource = $this->ApiSourceEndpoints->ApiSources->get( $vv_obj->api_source_id, ['contain' => 'ExternalIdentitySources'] diff --git a/app/availableplugins/ApiConnector/templates/ApiSourceEndpoints/fields.inc b/app/availableplugins/ApiConnector/templates/ApiSourceEndpoints/fields.inc index b5afc856c..22e5178c8 100644 --- a/app/availableplugins/ApiConnector/templates/ApiSourceEndpoints/fields.inc +++ b/app/availableplugins/ApiConnector/templates/ApiSourceEndpoints/fields.inc @@ -27,9 +27,11 @@ // This view does currently not support read-only if($vv_action == 'edit') { - print $this->element('notify/banner', [ - 'info' => __d('api_connector', 'information.endpoint.push', [$vv_push_endpoint]) - ]); + if(!empty($vv_push_endpoint)) { + print $this->element('notify/banner', [ + 'info' => __d('api_connector', 'information.endpoint.push', [$vv_push_endpoint]) + ]); + } print $this->element('form/listItem', [ 'arguments' => [