-
14 Oct 2011 12:23 PM #1
Strange Url in JSONP Proxy
Strange Url in JSONP Proxy
Hey Guys,
in my App i want to Retriever Data via json an my code looks like this
this is an Item in my TabBar.Code:xtype: 'list', title: 'Tabelle', iconCls: 'star', itemTpl: '{Platz} {Team_Kurzname} {PlusTore}:{MinusTore} {PlusPunkte}:{MinusPunkte}', store: { fields: ['Platz', 'Team_Kurzname', 'PlusTore', 'MinusTore', 'PlusPunkte', 'MinusPunkte'], proxy: { type: 'jsonp', limitParam: null, url : 'myurl.com', extraParams: { liganummer: '20011800', jn: '1', }, reader: { type: 'json', root: 'Tabelle' }, }, autoLoad: true }
now if i look into the URL, that is fired out by Sencha it looks like this:
So it fires me out an error!!!Code:http://myURL.com/tabellen/xyz.php?_dc=1318623514175&liganummer=20011800&jn=1&page=1&start=0&callback=Ext.data.JsonP.callback2
Is that a Bug that the callback variable is like that????
Greets from Germany
-
14 Oct 2011 2:20 PM #2Sencha - Community Support Team
- Join Date
- Jan 2009
- Location
- Palo Alto, California
- Posts
- 1,941
- Vote Rating
- 6
What is the error it is giving you? When I first wrote it we would just put a temporary function in the global scope but it looks like someone has changed it...
Ext JS Senior Software Architect
Personal Blog: http://edspencer.net
Twitter: http://twitter.com/edspencer
Github: http://github.com/edspencer
-
15 Oct 2011 1:14 AM #3
Strange Url in JSONP Proxy
Strange Url in JSONP Proxy
Hi,
this is the error thrown out:
but this error is referred to my PHP document.Code:ReferenceError: Can't find variable: ExtdataJsonPcallback2
What i want to know is why is the Callback variable set to:
I think this is the ProblemCode:callback=Ext.data.JsonP.callback2
Edit:
I`ve looked into the JSON, that is thrown back from my Server an put the result in an JSON-Validater, and also here is the ExtdataJsonPcallback2variable in front of the JSON an so this is invalid.
Thanks
-
15 Oct 2011 10:53 AM #4Sencha - Community Support Team
- Join Date
- Jan 2009
- Location
- Palo Alto, California
- Posts
- 1,941
- Vote Rating
- 6
Right - this looks like your bug instead of ours (unless I'm misunderstanding something)
Ext JS Senior Software Architect
Personal Blog: http://edspencer.net
Twitter: http://twitter.com/edspencer
Github: http://github.com/edspencer
-
17 Oct 2011 8:13 AM #5
So made a review of my Code but didn`t find the reason.
In ST1 I do exactly the same call and it works fine ??? Strange
Also I don`t know why all errors are thrown out twice???
I do only this one JsonP call but there are two errors
Code:ReferenceError: Can't find variable: ExtdataJsonPcallback1Is that a bug or did I make a coding error??Code:ReferenceError: Can't find variable: ExtdataJsonPcallback2
I did not change the code above
-
17 Oct 2011 9:45 AM #6Sencha - Community Support Team
- Join Date
- Jan 2009
- Location
- Palo Alto, California
- Posts
- 1,941
- Vote Rating
- 6
I see - I thought you were saying it causes a php error... we'll investigate
Ext JS Senior Software Architect
Personal Blog: http://edspencer.net
Twitter: http://twitter.com/edspencer
Github: http://github.com/edspencer
-
17 Oct 2011 8:09 PM #7
Please post what data the server is returning as well.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
17 Oct 2011 10:35 PM #8
Which data do you want to have the JSON returned from the server??
Edit:
I found another problem with Google Chrome Inspector.
Code:Uncaught ReferenceError: ExtdataJsonPcallback2 is not defined(anonymous function)Last edited by wiggerl3000; 17 Oct 2011 at 11:54 PM. Reason: New Error
-
19 Oct 2011 3:11 AM #9
If you're making a request to the server, the server will be returning something in the HTTP response, what is it?
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
19 Oct 2011 5:00 AM #10
So this is the complete Response Header
I think I found the problem the sencha-touch-all-debug.js sets a Breakpoint at Line 1952Code:HTTP/1.1 200 OK Date: Wed, 19 Oct 2011 12:54:09 GMT Server: Apache/2.2.20 X-Powered-By: PHP/5.2.13 Connection: close Transfer-Encoding: chunked Content-Type: json
and that crashes the Loading (in my opinion!!)
Code:return function() { var callArgs = args || arguments; if (appendArgs === true) { callArgs = slice.call(arguments, 0); callArgs = callArgs.concat(args); } else if (typeof appendArgs == 'number') { callArgs = slice.call(arguments, 0); Ext.Array.insert(callArgs, appendArgs, args); } return method.apply(scope || window, callArgs); };Last edited by wiggerl3000; 19 Oct 2011 at 5:35 AM. Reason: Found problem on sencha-touch-all-debug.js
Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.


Reply With Quote