• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

As designed [CodeEvent::fire ] Events startup order

#1
According to a source of function "XenForo_CodeEvent::fire", 7 events that use hint (load_class, controller_pre_dispatch, template_hook, etc..) may have incorrect startup order: events of same event_id (regardless of the setting priority) with empty "Event Hint" are always starts before events with hint specified.

For example:
Event="TemplateHook" with hint="page_container_content_title_bar" and order=1 will be executed after Event="TemplateHook" with hint="" and order=1000.
 

Mike

XenForo developer
Staff member
#2
This is documented on the listener page:
Lower execution orders will run first. Note that listeners that specify an event hint will always run after listeners that don't.