1. #1
    Touch Premium Member
    Join Date
    Aug 2010
    Posts
    104
    Vote Rating
    6
    touchy is on a distinguished road

      0  

    Default Architect 3.0.1 for Ext 4.2.2 if theme Neptune puts in extraneous script tag

    Architect 3.0.1 for Ext 4.2.2 if theme Neptune puts in extraneous script tag


    In index.html before the script tag for app.js it puts in a script tag for http cdn.sencha gpl 4.2.1 theme neptune js.

    Even though my Library Resource has Include CSS on.

    Noticed because causes console log to show Uncaught Reference Error Ext is not defined. Obviously, Ext isn't defined yet.

    Which passes harmless, the app then starts up fine.

    But it shouldn't be there.

    Doesn't happen with theme classic.

    Only noticed it when switching project settings for Framework from Commercial (which seemed to give us 4.2.1) to Complete and 4.2.2.1144.

    Using Architect 3.0.1.1343.

  2. #2
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,928
    Vote Rating
    63
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Can you please paste the contents of your index.html file?
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  3. #3
    Touch Premium Member
    Join Date
    Aug 2010
    Posts
    104
    Vote Rating
    6
    touchy is on a distinguished road

      0  

    Default


    Here is the generated index.html:

    Code:
    <html>
    <head>
        <meta charset="UTF-8">
        <title>MyApp</title>
    <link rel="stylesheet" href="resources/My-all.css"/>
    <script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/4.2.1/ext-theme-neptune.js"></script>
    <script type="text/javascript" src="app.js"></script>
    </head>
    <body>
    </body>
    </html>
    And as I said not a problem (not there I think) if classic. And wasn't there (or not a problem) before I switched from Framework Commercial to Custom, which I did because I noticed Commercial was 4.2.1 and we are allowed to use 4.2.2 because of Complete license. So this only appears for neptune.

  4. #4
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,928
    Vote Rating
    63
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    It appears you don't have Build tools (cmd) enabled. Is this true?
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  5. #5
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,928
    Vote Rating
    63
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Can you check your library node under resources in the inspector for me? Do you have include JavaScript unchecked?
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  6. #6
    Touch Premium Member
    Join Date
    Aug 2010
    Posts
    104
    Vote Rating
    6
    touchy is on a distinguished road

      0  

    Default


    Quote Originally Posted by Phil.Strong View Post
    It appears you don't have Build tools (cmd) enabled. Is this true?
    When on a command line I type Sencha is says Sencha Cmd v4.0.1.45 ...

    And when I click the Build web app button in Architect then it builds.

    Hence I would say build tools are enabled.

  7. #7
    Touch Premium Member
    Join Date
    Aug 2010
    Posts
    104
    Vote Rating
    6
    touchy is on a distinguished road

      0  

    Default


    Quote Originally Posted by Phil.Strong View Post
    Can you check your library node under resources in the inspector for me? Do you have include JavaScript unchecked?
    It has checked on Include JavaScript.

  8. #8
    Touch Premium Member
    Join Date
    Aug 2010
    Posts
    104
    Vote Rating
    6
    touchy is on a distinguished road

      0  

    Default


    New insights possibly. Doing a commit of our source code I am looking at what has changed.

    Let's remember I started with a Sencha Complete Trial, came with Architect 3.0.0, then at some time switched to Architect 3.0.1 and bought Sencha Complete, and then at some time switched project settings from Commercial to Custom and pointed it to an Ext JS 4.2.2 ext directory sitting on my hard disk.

    Worked for the most part, execpt this wrong element script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/4.2.1/ext-theme-neptune.js, wrong and (luckily or not) doesn't work because Ext isn't defined yet.

    Let's look at some of my diff when it went wrong:

    Code:
    diff --git a/my-project/index.html b/my-project/index.html
    --- a/my-project/index.html
    +++ b/my-project/index.html
    @@ -7,11 +7,11 @@
         <!-- <x-compile> -->
             <!-- <x-bootstrap> -->
                 <link rel="stylesheet" href="bootstrap.css">
    -            <script src="ext/ext-dev.js"></script>
    +            <script src="undefined/ext-dev.js"></script>
                 <script src="bootstrap.js"></script>
             <!-- </x-bootstrap> -->
             <script src="libjs/unrelated.js"></script>
    -        <script src="ext/ext-theme-neptune.js"></script>
    +        <script src="http://cdn.sencha.com/ext/gpl/4.2.1/ext-theme-neptune.js"></script>
             <script type="text/javascript" src="app.js"></script>
         <!-- </x-compile> -->
     </head>
    We know that is generated, so let's look at sources:

    Code:
    diff --git a/my-project/MyApp.xds b/my-project/MyApp.xds
    --- a/my-project/MyApp.xds
    +++ b/my-project/MyApp.xds
    @@ -2,9 +2,9 @@
         "name": "MyApp",
         "settings": {
             "cmd": {
    -            "license": "commercial",
    +            "license": "custom",
                 "cmdVersion": "4.0.1.45",
    -            "frameworkVersion": "4.2.1.883"
    +            "frameworkOverride": "/home/me/Downloads/ext-4.2.2.1144"
             },
             "canvasControls": {
                 "viewportSize": {
    @@ -23,6 +23,7 @@
             "cacheBust": false,
             "buildShouldOverwriteIndex": true,
             "generateArchitectVersion": true,
    +        "displayfield-ExtBox1-1397-inputEl": "Not Installed",
             "lastBuildSelection": {
                 "value": "webBuild",
                 "display": "Build web app"
    And:

    Code:
    diff --git a/my-project/metadata/resource/Library b/my-project/metadata/resource/Library
    --- a/my-project/metadata/resource/Library
    +++ b/my-project/metadata/resource/Library
    @@ -6,7 +6,6 @@
         },
         "codeClass": null,
         "userConfig": {
    -        "basePath": "ext/",
             "designer|userClassName": "Library",
             "theme": "neptune"
         },

  9. #9
    Touch Premium Member
    Join Date
    Aug 2010
    Posts
    104
    Vote Rating
    6
    touchy is on a distinguished road

      0  

    Default


    Problem solved.

    The diff gave me a hint.

    Went to Resources - Library - Library Base Path and set it to ext/ .

    Do I know why it had changed? No. Maybe automatically when I switched Framework from Commercial to Custom?

    The index.html now gets generated identical to before, i.e. no more URL with http to neptune, and not in the wrong place.

  10. #10
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,928
    Vote Rating
    63
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Awesome you figured it out.

    We have a bug in 3.0.1 where the library base path was being set to null!?!?!?!

    The next patch fixes this though I'm not completely sure why it's happening. A little more detail could help me get to the root of the problem.

    1st let me explain what Architect is trying to do. When you upgrade or init cmd it looks at your project root and tries to find the framework directory, in this case ext. If it cannot find it, it then looks up a directory for it, repeat. The idea being that you could be using a workspace.

    My patch coming in 3.0.2 was simply to say hey if you didn't find it then set it to touch/ or ext/

    Clearly in this case that works. I'm wondering if it's a bug in the check OR if that directory simply inside there yet when Cmd tells me it's all done initializing for a particular framework version.

    Questions:

    1. what OS?
    2. what is the path to the root of your project?
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

Thread Participants: 1