From 5f42092d6cea2c15ecc5240e439b95fb2f7e651d Mon Sep 17 00:00:00 2001 From: Jeroen Dalsem Date: Fri, 2 Aug 2024 07:53:24 +0200 Subject: [PATCH] chore: set context early for menu items --- views/default/object/widget_page.php | 3 --- views/default/resources/widget_manager/widget_page.php | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/views/default/object/widget_page.php b/views/default/object/widget_page.php index 2c4033b..7bcac70 100644 --- a/views/default/object/widget_page.php +++ b/views/default/object/widget_page.php @@ -16,9 +16,6 @@ return; } -elgg_push_context('index'); -elgg_set_page_owner_guid($entity->guid); - $num_columns = $entity->getNumColumns(); $layout = $entity->layout; diff --git a/views/default/resources/widget_manager/widget_page.php b/views/default/resources/widget_manager/widget_page.php index e3b5d7a..d6e01bd 100644 --- a/views/default/resources/widget_manager/widget_page.php +++ b/views/default/resources/widget_manager/widget_page.php @@ -17,6 +17,9 @@ $widget_page = $pages[0]; +elgg_push_context('index'); +elgg_set_page_owner_guid($widget_page->guid); + if ($widget_page->canEdit()) { $href = elgg_generate_url('widgets:add_panel', [ 'context' => elgg_get_context(),