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:

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?

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.

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.

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.

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?

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.

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...

Originally Posted by mlmcconnell

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.