Results 1 to 3 of 3

Thread: CMD 6.5 breaks the URL for remote js files

  1. #1
    Sencha Premium User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    807

    Default CMD 6.5 breaks the URL for remote js files

    I see after the build CMD breaks the url for remote js resources and appends one "/" at the end which fails to load that js resource.

    app.json
    Code:
        "js": [
            {
                "path": "/service/userAdmin/loadUserContext.js",
                "remote": true
            },

    generated bootstrap.json

    Code:
    {"remote":true,"path":"../../../../../../../service/userAdmin/loadUserContext.js/"},

    I'm looking for the cause but probably someone encountered already this issue and knows the fix.
    Github https://github.com/vadimpopa
    Blogging @ : http://vadimpopa.com
    Twitter: @vadimvpopa

  2. #2
    Sencha Premium User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    807

    Default

    In case others have this CMD 6.5.1 (6.5.1.240) issue the fix is:

    Code:
        <target name="-after-build">
            <!-- Fix issue: https://www.sencha.com/forum/showthread.php?406409-CMD-6-5-breaks-the-URL-for-remote-js-files -->
            <if>
                <equals arg1="${build.environment}" arg2="production"/>
                <then>
                    <x-echo message="Environment ${build.environment} - fix for trailing slashes"/>
                    <replace file="${build.dir}/app.json" token=".js/" value=".js"/>
                    <replace file="${build.dir}/app.jsonp" token=".js/" value=".js"/>
                </then>
            </if>
            <if>
                <equals arg1="${build.environment}" arg2="development"/>
                <then>
                    <x-echo message="Environment ${build.environment} - fix for trailing slashes"/>
                    <replace file="${app.dir}/bootstrap.json" token=".js/" value=".js"/>
                    <replace file="${app.dir}/bootstrap.jsonp" token=".js/" value=".js"/>
                </then>
            </if>
        </target>
    Github https://github.com/vadimpopa
    Blogging @ : http://vadimpopa.com
    Twitter: @vadimvpopa

  3. #3
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    28

    Default

    Hi there,

    sadly this issue is still happening with Sencha CMD 6.6.13 on Linux systems. I contacted sencha support and they said the engineering team will work on it. The support ticket was closed without given eta, but it was referenced with an existing SDKTOOLS ticket that was opened Feb. 2018. Sooooo, lets see when it get release.

    Thank you vadimv for this workaround. Works as expected!

Similar Threads

  1. Replies: 0
    Last Post: 18 Sep 2014, 12:48 PM
  2. Replies: 1
    Last Post: 20 Jul 2014, 6:35 PM
  3. Replies: 1
    Last Post: 31 Oct 2012, 5:52 AM
  4. All css files of ExtJS 4 have no line breaks
    By Qtx in forum Ext: Discussion
    Replies: 3
    Last Post: 30 May 2011, 4:32 AM
  5. Asynchronous loading of remote JS files?
    By Arcomat in forum Ext 2.x: Help & Discussion
    Replies: 14
    Last Post: 10 Oct 2008, 10:29 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •