code from views.php:
// Trigger the pagesetup event
if (!isset($CONFIG->pagesetupdone)) {
elgg_trigger_event('pagesetup', 'system');
$CONFIG->pagesetupdone = true;
}
// Trigger the pagesetup event
if (!isset($CONFIG->pagesetupdone)) {
$CONFIG->pagesetupdone = true;
elgg_trigger_event('pagesetup', 'system');
}
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Brett@brett.profitt

Brett - 0 likes
- Ruben@rubenz

Ruben - 0 likes
You must log in to post replies.This is a known issue: http://trac.elgg.org/ticket/3688 and http://trac.elgg.org/ticket/3684
The site shouldn't crash, but this comes down to establishing best practices. What's the reason for calling elgg_view() in pagesetup?
I'm using it to 'extend' a menu item with a panel:
$link = elgg_view('core/account/login_dropdown');
elgg_register_menu_item(
'topbar',
array( 'name' => 'login',
'href' => false,
'text' => 'login' . $link,
'priority' => 450,
'section' => 'alt', ));
If i put the pagesetup before the trigger then everything seems to be ok, but i don't know if that has any side-effects?