1. #1
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Baton Rouge, LA
    Posts
    73
    Vote Rating
    4
    mlmcconnell is on a distinguished road

      0  

    Default Architect 2.1 Upgrade Strangeness......

    Architect 2.1 Upgrade Strangeness......


    Hi,

    I upgraded to version 2.1 of Sencha Architect this evening and it broke an application I'm working on. I'm a bit confused how this could have happened since I'm pointing my project to the exact same ExtJS 4.1 library that I was using with Architect 2.0. I'm using Steve Blades' "cfqueryreader" component to properly format ColdFusion JSON returns into a format that's usable by ExtJS. This has been working just fine until I applied the Architect upgrade tonight. It pulled and formatted the data from a MySQL database via ColdFusion and my data grids were populated perfectly. Now, it looks like my app is choking at the precise point where the store is loading. Here is the code I use to initialize the data store:

    Code:
    Ext.define('COOPBookManager.store.SituationStore', {
        extend: 'Ext.data.Store',
        alias: 'store.sitstore',
        requires: [
            'COOPBookManager.model.SituationsModel'
        ],
    
    
        constructor: function(cfg) {
            var me = this;
            cfg = cfg || {};
            me.callParent([Ext.apply({
                autoLoad: true,
                storeId: 'situationstore',
                model: 'COOPBookManager.model.SituationsModel',
                proxy: {
                    type: 'ajax', 
                    extraParams: {
                        returnFormat: 'json',
                        method: 'GetAllStandard' 
                    },
                    reader: {
                         type : 'cfquery'
                    },
                    limitParam: 'pageSize',
                    pageParam: 'pageIndex',
                    simpleSortMode: false,
                    url: 'Services/situationservice.cfc'
                }
            }, cfg)]);
        }
    });
    Just as an experiment, I changed the reader type to "json" and, as expected, it returns data but not in a format that ExtJS understands so the grid is never populated [this is a known issue with ColdFusion's JSON format which is evidently non-standard]. I only did this to see if it was, in fact, the store causing the problem and based on the results I have to assume it is.

    The specific error I'm getting is: Uncaught TypeError: Cannot call method 'substring' of undefined.
    This occurs at the line that starts with "me.CallParent" (I think). Why would this suddenly start happening when all I did was upgrade the IDE?

    And on a related issue, since Architect has no native "cfquery" data reader, I have to hand code the store.js file. Every time I deploy my app, Architect over-writes my store file and I have to manually over-write it with a good copy I've saved elsewhere in the project directory. Is there a way to create an override that will prevent this behavior? What would the syntax look like as I'm not real experienced writing overrides?

    Thank You,
    M. McConnell
    Last edited by aconran; 15 Aug 2012 at 4:15 PM. Reason: add code tags

  2. #2
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Baton Rouge, LA
    Posts
    73
    Vote Rating
    4
    mlmcconnell is on a distinguished road

      0  

    Default Found it....

    Found it....


    OK...Found the problem. I was storing the referenced cfqueryreader.js file at the root of the application's directory. I created a project reference to the file and it correctly pulled in the contents of the JavaScript file. However, when I deployed the app, the file was overwritten with a blank version of cfqueryreader.js

    I moved cfqueryreader.js outside of the application folder (to the root of the webserver) and now it works fine.

    Is this expected behavior? Overwriting a file in the applications directory seems a bit rude.

    M. McConnell

  3. #3
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,882
    Vote Rating
    101
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by mlmcconnell View Post
    OK...Found the problem. I was storing the referenced cfqueryreader.js file at the root of the application's directory. I created a project reference to the file and it correctly pulled in the contents of the JavaScript file. However, when I deployed the app, the file was overwritten with a blank version of cfqueryreader.js

    I moved cfqueryreader.js outside of the application folder (to the root of the webserver) and now it works fine.

    Is this expected behavior? Overwriting a file in the applications directory seems a bit rude.

    M. McConnell
    Eek, no this is not correct. Would you be able to create a small replica of the issue and share it with us? Any critical sorts of issues we will be addressing in a patch release/auto update quite quickly.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  4. #4
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Baton Rouge, LA
    Posts
    73
    Vote Rating
    4
    mlmcconnell is on a distinguished road

      0  

    Default Replica

    Replica


    Aaron,

    I'm happy to share, but what do you mean by "replica"? Here is a more detailed explanation if this is what you need:

    Original Scenario (fail):
    Copied cfqueryreader.js to the root folder of my application.
    In Architect 2.1, I added a JS Resource with a url of "cfqueryreader.js" (no code populated the editor window).
    Saved and deployed the application from Architect.
    Application failed to load correctly with the error message I identified above.
    Opened cfqueryreader.js in a text editor and discovered it was now an empty file.

    Attempted fix 1 (fail):
    Copied fresh copy of cfqueryreader.js to the root folder of my application.
    In Architect 2.1, I repointed the JS Resource to "http://localhost/applicationdirectory/cfqueryreader.js" (the JS code populated the editor window).
    Saved and deployed the application from Architect.
    Application failed to load correctly with the error message I identified above.
    Opened cfqueryreader.js in a text editor and discovered it was again an empty file.

    Attempted fix 2 (fail):
    Put a fresh copy of cfqueryreader.js in the application's "app" folder (thought it might be a namespace problem)
    Repointed the Resource url to the new file location (simply "app\cfqueryreader.js" - no code loaded in the Editor window).
    Saved and deployed project.
    Ended up with two EMPTY copies of cfqueryreader.js (in the app folder and at the application root) and the application failed to load.

    Attempted fix 3 (success):
    Put a fresh copy of cfqueryreader.js at the root level of my web server.
    Repointed the Resource url to "http://localhost/cfqueryreader.js".
    The Architect Edit window for the JS Resource populated with the contents of the JS file.
    Saved and deployed the project
    Application loaded correctly and the datagrid populated as expected.
    NOTE - Architect is still deploying two empty copies of cfqueryreader.js (one at the root of the application folder and another in the application's app directory. App.html correctly references the cfqueryreader.js file at the root of my web server, though, so the application is working correctly.

    It's almost like there is a meta data file for the project somewhere that has kept references to any place I attempted to reference the JS file. I can't find any references to the two empty files being created anywhere in the project file.

    Please let me know if you need anything else...I'm happy to help.

    M. McConnell

  5. #5
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,882
    Vote Rating
    101
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    This is lots of good information to be able to try to duplicate it.

    Could you give me some more information about your os/version? Also could you give me some info about your project directory and deploy path? Any thing out of the ordinary re: special characters, spaces in path, mapped drives, etc?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  6. #6
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,882
    Vote Rating
    101
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Did a number of tests on Windows 7 tonight trying to replicate your problem and I was unable to.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  7. #7
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Baton Rouge, LA
    Posts
    73
    Vote Rating
    4
    mlmcconnell is on a distinguished road

      0  

    Default OS & Path Info...

    OS & Path Info...


    @Aaron,

    I'm using Mac OS X Mountain Lion. Neither my project directory nor my deploy to directory contain special characters:

    Projects: /Library/Webserver/Documents/ExtJSProjects/{Projectname}
    Deploy: /Library/Webserver/Documents/{Appfolder}

    I did try another experiment to see if it would work and it did. I loaded the referenced file (cfqueryreader.js) into the root of the PROJECTS directory and now the deploy process pushes the legitimate version of the file to the deploy to directory. Before anyone says "you should have been doing that all along", I never had to do that in version 2.0 and it is not referenced anywhere in the docs . The config simply asks for the url of the external JS file and makes no mention that "the file must be in your project directory".

    I was still having various UI issues with 2.1 where the Design view would become cluttered with multiple images of the component I was working on and this was affecting productivity. Also, form field selection was wonky within the designer. I was having to click about 30 - 50 pixels BELOW the actual component before it would select. I went ahead and downgraded to version 2.0 (with your help) and I'm back in business. Think I'll do the next upgrade on a VM because this was not a pleasant experience for me.

    M. McConnell

  8. #8
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,882
    Vote Rating
    101
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by mlmcconnell View Post
    I did try another experiment to see if it would work and it did. I loaded the referenced file (cfqueryreader.js) into the root of the PROJECTS directory and now the deploy process pushes the legitimate version of the file to the deploy to directory. Before anyone says "you should have been doing that all along", I never had to do that in version 2.0 and it is not referenced anywhere in the docs . The config simply asks for the url of the external JS file and makes no mention that "the file must be in your project directory".
    This is how its intended to work, but that shouldn't stop you from linking additional files in. That being said, they shouldn't be copied into the deploy directory. There may be an issue here but we haven't figured out what it is...

    Quote Originally Posted by mlmcconnell View Post
    I was still having various UI issues with 2.1 where the Design view would become cluttered with multiple images of the component I was working on and this was affecting productivity. Also, form field selection was wonky within the designer. I was having to click about 30 - 50 pixels BELOW the actual component before it would select. I went ahead and downgraded to version 2.0 (with your help) and I'm back in business. Think I'll do the next upgrade on a VM because this was not a pleasant experience for me.
    We'll have a patch release out in the next couple of days fixing a few upgrade issues, etc. It'd be great if you had the time to report these bugs.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar