Skip to content

Commit

Permalink
chore: set context early for menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalsem committed Aug 2, 2024
1 parent 117845a commit 5f42092
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions views/default/object/widget_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
return;
}

elgg_push_context('index');
elgg_set_page_owner_guid($entity->guid);

$num_columns = $entity->getNumColumns();
$layout = $entity->layout;

Expand Down
3 changes: 3 additions & 0 deletions views/default/resources/widget_manager/widget_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 5f42092

Please sign in to comment.