Hybrid View

    Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    9
    Vote Rating
    0
    wiggerl3000 is on a distinguished road

      0  

    Default 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

    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
                        }
    this is an Item in my TabBar.

    now if i look into the URL, that is fired out by Sencha it looks like this:

    Code:
    http://myURL.com/tabellen/xyz.php?_dc=1318623514175&liganummer=20011800&jn=1&page=1&start=0&callback=Ext.data.JsonP.callback2
    So it fires me out an error!!!

    Is that a Bug that the callback variable is like that????

    Greets from Germany

  2. #2
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    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

  3. #3
    Sencha User
    Join Date
    Aug 2010
    Posts
    9
    Vote Rating
    0
    wiggerl3000 is on a distinguished road

      0  

    Default Strange Url in JSONP Proxy

    Strange Url in JSONP Proxy


    Hi,

    this is the error thrown out:

    Code:
    ReferenceError: Can't find variable: ExtdataJsonPcallback2
    but this error is referred to my PHP document.

    What i want to know is why is the Callback variable set to:

    Code:
    callback=Ext.data.JsonP.callback2
    I think this is the Problem

    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

  4. #4
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    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

  5. #5
    Sencha User
    Join Date
    Aug 2010
    Posts
    9
    Vote Rating
    0
    wiggerl3000 is on a distinguished road

      0  

    Default


    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: ExtdataJsonPcallback1
    Code:
    ReferenceError: Can't find variable: ExtdataJsonPcallback2
    Is that a bug or did I make a coding error??

    I did not change the code above

  6. #6
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    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