Jump to content

where or how can we define the modules load order priorities?


horst
 Share

Recommended Posts

Hey, hey! 🙋‍♂️

I remember that there is somewhere & somehow the possibility to define / change the loading priority of modules during the PW start procedure.
(Something from default 0 up to +100 or down -100, if I remember right?)
But where is it or how can we do this?

Please help me! 😇😄

 

Link to comment
Share on other sites

You can apparently set autoload to any integer, the higher the earlier: https://github.com/processwire/processwire/blob/1b0d51e2751aec462b431fc736c3e16e6502c9aa/wire/core/Module.php#L218 Numbers >= 10000 (plus some other conditions) make it a “preload” module and move it up even before core modules.

Not sure if there’s a way to change the order of modules without modifying them.

Edited by Jan Romero
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

Just a note that I set Tracy to 100000 so you'll want to make sure your highest one is still lower than that if you want to be able to use Tracy within other modules.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...