Results 1 to 3 of 3

Thread: Adding trailing slash for remote javascript url.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Sep 2007
    Location
    Phoenix AZ
    Posts
    118

    Default Adding trailing slash for remote javascript url.

    I found a bug that was summited for this error a while ago... but now I can't find the bug report.


    Does the new open tooling solve this problem?


    I have a javascript file that I need to load but it is not within my app but it is on the same server.

    If i set remote to true sencha cmd adds a trailing slash to the URL

    this will try to load /static/api/Api.js/ and of course it gets a 404

    from the app.json file:

    Code:
    "js": [
            {
                "path": "app.js",
                "bundle": true
            },
            {
    //            /**
    //             * Ext.Direct API URL: if the app runs inside Cordova, you will need to change
    //             * the path to the absolute endpoint (e.g. https://192.168.1.2:3000/api/).
    //             */
    //   
                 "path": "/static/api/Api.js",
                 "remote": true
            }

    if I include the host name on the URL it works fine. But I don't always know the hostname.


    Code:
    "js": [
            {
                "path": "app.js",
                "bundle": true
            },
            {
    //            /**
    //             * Ext.Direct API URL: if the app runs inside Cordova, you will need to change
    //             * the path to the absolute endpoint (e.g. https://192.168.1.2:3000/api/).
    //             */
    //   
                 "path": "https://testweb1.example.com/static/api/Api.js",
                 "remote": true
            }

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Location
    Phoenix AZ
    Posts
    118

    Default

    I got around this via:

    Code:
      {
    //            /**
    //             * Ext.Direct API URL: if the app runs inside Cordova, you will need to change
    //             * the path to the absolute endpoint (e.g. https://192.168.1.2:3000/api/).
    //             */
    //   
                 "path": "../../../../static/api/Api.js",
                 "includeInBundle": true
            }

    If the file exists then this is fine. I still would lie to be able to load a local javascript file from a url. Appending the slash at the end looks like a bug to me. I found a bug report in the forum yesterday... but now I can't find it to reference it.....

    -Mark

  3. #3
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    569

    Default

    Hello Mark,

    I see that you have also opened a support ticket for this issue, we noticed there is an open bug ticket for this with reference number SDKTOOLS-1919. We request you to follow the updates on the support ticket but if there is any important update on the Bug we will ensure to notify you.

    Regards,
    Kumar
    Sencha Support.

Posting Permissions

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