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(),