Won't fix Javascript load order inconsistent between page & fetched as json

Xon

Well-known member
Affected version
1.5.18
XenForo_Template_Abstract::getRequiredExternalsAsHtml() does $typeRequired = array_unique($required[$type]);
XenForo_Template_Abstract::getRequiredExternals() does $typeRequired = array_reverse(array_unique($required[$type]));

The first is called when XenForo displays as a page, the 2nd for an overlay.
 
I think you're right that ideally these should be consistently ordered, but given that the code has existed in both cases since 2010 without being modified, I'm reluctant to make any changes here. Firstly, there may have been significant reasons it was done like that (I can't think of any though to be fair) and secondly I wouldn't like to change the load order now and affect existing code where the order of the loads (especially with JS) is significant.
 
Top Bottom