You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, this means that plugin loading order is not deterministic; it depends on in what order plugins are installed. This makes it difficult to track down issues such at this one in SEOmatic, because plugins will load in a different order on Site A than Site B:
...where the issue only happens if SEOmatic is installed before Craft Commerce is installed. So obviously an issue on my end that will be fixed, but I think it would make diagnosing issues such as this easier if plugins were always loaded in a deterministic order, just like MacOS kernel extensions and other such things are.
...so that plugins will always be loaded in a deterministic order, alphabetically by their plugin handle.
While it may seem like it's a breaking change in terms of affecting the loading order of plugins, you're actually making that same breaking change yourself every time you install or uninstall a plugin.
Deterministic loading order across sites is always better than random on a per-site basis, based on a hidden variable (install order)
Yeah, I know, I know re: "AAA SEO" but at least it'll be the same on every install. I'm with @AugustMiller that plugins should be agnostic about loading order, but this will make it easier to debug when something goes wrong.
Currently
services/Plugins
loads plugins with this query:ref: https://github.com/craftcms/cms/blob/develop/src/services/Plugins.php#L198
Unfortunately, this means that plugin loading order is not deterministic; it depends on in what order plugins are installed. This makes it difficult to track down issues such at this one in SEOmatic, because plugins will load in a different order on Site A than Site B:
nystudio107/craft-seomatic#654 (comment)
...where the issue only happens if SEOmatic is installed before Craft Commerce is installed. So obviously an issue on my end that will be fixed, but I think it would make diagnosing issues such as this easier if plugins were always loaded in a deterministic order, just like MacOS kernel extensions and other such things are.
So I propose changing the query to:
...so that plugins will always be loaded in a deterministic order, alphabetically by their plugin handle.
While it may seem like it's a breaking change in terms of affecting the loading order of plugins, you're actually making that same breaking change yourself every time you install or uninstall a plugin.
Deterministic loading order across sites is always better than random on a per-site basis, based on a hidden variable (install order)
Related: #3028
The text was updated successfully, but these errors were encountered: