1. 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']

Discussion in 'Resolved Bug Reports' started by tyteen4a03, Mar 26, 2013.

  1. tyteen4a03

    tyteen4a03 Well-Known Member

    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.
     
    Andy.N likes this.
  2. digitalpoint

    digitalpoint Well-Known Member

    Did you recompile the templates?
     
  3. tyteen4a03

    tyteen4a03 Well-Known Member

    Yes, two times actually. 1 time during update, another time reimporting the template.
     
  4. digitalpoint

    digitalpoint Well-Known Member

    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). :)
     
    tyteen4a03 likes this.
  5. Mike

    Mike XenForo Developer Staff Member

    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.
     
    Slavik likes this.
  6. tyteen4a03

    tyteen4a03 Well-Known Member

    So I have to retain a copy of the js folder in the root folder along with the CDN one?
     
  7. Mike

    Mike XenForo Developer Staff Member

    Yes.

    The first thing we're going to direct people to is the file health check.
     
    Slavik and tyteen4a03 like this.

Share This Page