• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Partial fix AdminCP does not respect $config['javaScriptUrl']

tyteen4a03

Well-known member
#1
This is the public javascript bit:
Code:
<script src="{$jQuerySource}"></script>
<xen:if is="{$jQuerySource} != {$jQuerySourceLocal}">
<script>if (!window.jQuery) { document.write('<scr'+'ipt type="text/javascript" src="{$jQuerySourceLocal}"><\/scr'+'ipt>'); }</script>
</xen:if><xen:if is="{$xenOptions.uncompressedJs} == 1 OR {$xenOptions.uncompressedJs} == 3">
<script src="{$javaScriptSource}/jquery/jquery.xenforo.rollup.js?_v={$xenOptions.jsVersion}"></script></xen:if>
<script src="{xen:helper javaScriptUrl, '{$javaScriptSource}/xenforo/xenforo.js?_v={$xenOptions.jsVersion}'}"></script>
<!--XenForo_Require:JS-->
This is the AdminCP javascript bit:

Code:
<script src="{$jQuerySource}"></script><xen:if is="{$xenOptions.uncompressedJs} == 1 OR {$xenOptions.uncompressedJs} == 3">
<script src="js/jquery/jquery.xenforo.rollup.js?_v={$xenOptions.jsVersion}"></script></xen:if>
<script src="{xen:helper javaScriptUrl, 'js/xenforo/xenforo.js?_v={$xenOptions.jsVersion}'}"></script>
<script src="{xen:helper javaScriptUrl, 'js/xenforo/acp_quicksearch.js?_v={$xenOptions.jsVersion}'}"></script>
As you can see, AdminCP Javascripts URLs are not padded with the {$javaScriptSource} variable.
 

digitalpoint

Well-known member
#4
I just checked and you're right... it looks like sidebar.js adheres to the prefix, but the rest don't. I guess I never noticed since not many users in admin area (just me). :)
 

Mike

XenForo developer
Staff member
#5
I would say that this is sort of intentional as it does prevent some mistakes (aggressive CDN caching, files not being uploaded externally correctly, etc). But the issue is if it's not consistent.
 

tyteen4a03

Well-known member
#6
I would say that this is sort of intentional as it does prevent some mistakes (aggressive CDN caching, files not being uploaded externally correctly, etc). But the issue is if it's not consistent.
So I have to retain a copy of the js folder in the root folder along with the CDN one?