Daniel Barrett asked:

> tl;dr:   Is it possible to enforce an order on callback functions 
> that are attached to the same hook?
...
> Unfortunately, MediaWiki 1.28.0 always runs CategoryTree's callback after 
> mine, 
> so no matter what I do, CategoryTree wins. (Strangely, in 1.27, my extension 
> always won.)

I don't see any sort of enforced ordering from a quick glance at the code. It 
does 
merge together "old school" ($wgHooks) and "new school" (extension.json) hooks 
into a single array, which might account for some of the odd behaviour you are 
seeing. 

I would try to use the same registration method as the version of CategoryTree 
you 
have. In other words, have your extension use the new extension.json if you 
have a 
modern CategoryTree. Otherwise, both can use wgHooks.

Then, in theory, the order they are called in LocalSettings.php should produce 
a 
sane and repeatable order.

-- 
Greg Sabino Mullane [email protected]
End Point Corporation
PGP Key: 2529 DF6A B8F7 9407 E944  45B4 BC9B 9067 1496 4AC8

Attachment: signature.asc
Description: PGP signature

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to