View Full Version : Direct not working in Architect, but IS working in browser...

18 Apr 2012, 10:13 AM
I have been using the Direct class system throughout the Architect 2 beta releases. At this point, I am unable to right click a store and "load data" (depending on the time of day, it is either grayed out or returns nothing). But, the stores are still working correctly when I look at the app in a browser, with no console errors.

Any ideas as to why a store would not work inside of Architect, but does work in a browser?

18 Apr 2012, 10:32 AM
I am assuming you have direct API set correctly in project preferences and you get the message "Successfully updated Ext Direct API".

If that is true, then the directFn needs to be selected via the list of api available in the directFn config menu.

18 Apr 2012, 10:41 AM
Sorry about the lack of details.

Your assumptions are correct. The API loads correctly and I get a list of directFn in the proxy drop down. After selecting the correct function and adding the correct extraparams, as well as fields in the store and the root in the reader, the store's "load data" still doesn't work within Architect. But, the grid loads just fine in a browser (outside of Architect).

18 Apr 2012, 10:59 AM
Do you have url prefix defined? this is so api url can be resolved

Say if you have api.php which has relative url - 'url'=>'php/router.php'

18 Apr 2012, 11:10 AM
Attaching a simple Direct project with Grid using DirectFn to read data

18 Apr 2012, 11:52 AM
I am sad to report that I am experiencing the exact same result with your file. Please see my screenshots below. As you can see, the browser receives the data correctly, the settings are correct in the Architect file, but the "load data" option is still grayed out...


18 Apr 2012, 12:04 PM
That tells me your directFn in direct proxy is not getting eval'ed to a function

18 Apr 2012, 12:20 PM
Is that something I can fix?

18 Apr 2012, 12:32 PM
Whats your environment like - mac, windows.. and version? And your backend server that you use? It could be due to that. I can try to replicate here.

18 Apr 2012, 12:59 PM
Win7. I have attempted this on both IIS, and a Virtual Machine running Turnkey LAMP. I get the same result.

I have tried deleting the Sencha folder from the [user]/AppData/local/Sencha, Inc/ directory and that does not seem to help.

I just had a co-worker replicate this issue by creating a new architect file and pointing it to the direct api file. Before saving the file, the 'load data' option is available and works. Upon saving the file, it reverts to the issue I've described. And this is using your files that you've provided on two different systems and server types.

18 Apr 2012, 1:18 PM
Have had exactly this same problem as descibed in my project. Last few versions of the beta it hasn't worked, before that was OK. 'Auto-columns' does work correctly on the grids so there is some level of coms between Architect and the backend. Also Win7-64 with C# backend.

18 Apr 2012, 8:56 PM
Thanks for that info. What happens when you open the project next time?

18 Apr 2012, 8:58 PM
I would like to add that the "load data" option seems to be available when creating a new Architect file, but disappears as soon as the file is saved.

18 Apr 2012, 9:02 PM
After the file is saved the "load data" option is unavailable regardless of closing and opening the file.

20 Apr 2012, 5:32 PM
Any update on this? Were you able to replicate the issue?

7 Aug 2012, 2:45 PM
We're having the same problem with Architect. Getting an error "TypeError: 'undefined' is not an objectSource Class: undefined Line 0". Used Charles proxy to debug this error and noticed that the request is not even being sent to the server. We're also seeing deleted objects come back into the project after we save and reopen. The project deploys fine and works fine in the browser. I have to say the Architect is buggy.