Search

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.

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.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details