Event execution order
This is an open discussion with 6 replies, filed under Troubleshooting.
Search
Assuming they are custom events you could rename them. I believe event execution is alphabetical; so perhaps rename the one with priority to start with a numerical value.
Yep I think they are fired in the order in which they are saved in the database (the order in which they appear in the select when saving a page). At the database level you could try swapping the order around in the sym_pages
table — find the page, the events
column. Does that change the order of execution?
@Lewis, Thank you. I found that line 48 of class.eventmanager.php
is responsible for sorting the event list alphabetically.
Conclusion: Events are executed in alphabetical order.
Glad you got it sorted out :-)
Good to have this documented.
Lewis?
:-)
Noted.
Create an account or sign in to comment.
I have two events on a single page and one event relies on the other. Rather than just being lucky, can I manipulate the order to which events are executed?
Thanks.