1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    206
    Vote Rating
    8
    allisterf is on a distinguished road

      0  

    Default Twitter Store fails after upgrade to 2.2.1

    Twitter Store fails after upgrade to 2.2.1


    I'm finding this in every app that I upgrade to the recent 2.2.1 where I'm accessing the twitter api to show a list of recent tweets from any particular place.

    An example of the store is:
    Code:
    Ext.define('MyApp.store.TweetStore', {
        extend: 'Ext.data.Store',
    
    
        requires: [
            'MyApp.model.TweetModel'
        ],
    
    
        config: {
            autoLoad: true,
            model: 'MyApp.model.TweetModel',
            storeId: 'TweetStore',
            proxy: {
                type: 'jsonp',
                extraParams: {
                    q: 'from:MellingtonHall'
                },
                url: 'http://search.twitter.com/search.json',
                reader: {
                    type: 'json',
                    rootProperty: 'results'
                }
            }
        }
    });
    The api url is correct, as is the root. Are extraParams somehow not operating in the same way 2.2.1 as in previous versions?

    Thanks for your help
    Allister

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,198
    Vote Rating
    120
    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 aconran is a splendid one to behold

      0  

    Default


    It's not loading within Architect or it's not loading within the application when running in the browser?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    206
    Vote Rating
    8
    allisterf is on a distinguished road

      0  

    Default


    Both Aaron. I'm getting the red store fail mark within Architect as well as no record loading in the browser.

    Allister
    PS - just to confirm, these are apps that worked fine in an earlier version of Architect, but the same store fails in 2.2.1

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,198
    Vote Rating
    120
    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 aconran is a splendid one to behold

      0  

    Default


    Hrm, that doesn't make much sense. Are you pointing to the same version of the library?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    206
    Vote Rating
    8
    allisterf is on a distinguished road

      0  

    Default


    The library path is:
    http://extjs.cachefly.net/touch/sencha-touch-2.0.1.1/

    Is this correct? I assumed the upgrade would have made sure?

    The weird thing is I have multiple jsonp stores in any particular app. All the rest of those stores work fine - it's just the twitter search that uses the extra parameters that has gone askew. However, existing apps that are already published and use the same code basis are reading and showing tweets without a problem

    Any ideas?
    Allister

  6. #6
    Sencha User
    Join Date
    Aug 2011
    Posts
    206
    Vote Rating
    8
    allisterf is on a distinguished road

      0  

    Default


    to confirm the error, I started a new project from the current build, but made a 2.0 version project. I created exactly the same store from the twitter search and it returned feed items perfectly correctly. This doesn't seem to work in 2.2. Not tried 2.1

    Allister

  7. #7
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,198
    Vote Rating
    120
    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 aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by allisterf View Post
    to confirm the error, I started a new project from the current build, but made a 2.0 version project. I created exactly the same store from the twitter search and it returned feed items perfectly correctly. This doesn't seem to work in 2.2. Not tried 2.1

    Allister
    these 2.0, 2.1 and 2.2 versions... are you talking about touch or architect?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  8. #8
    Sencha User
    Join Date
    Aug 2011
    Posts
    206
    Vote Rating
    8
    allisterf is on a distinguished road

      0  

    Default


    sencha architect
    Version: 2.2.1 Build: 951
    Release Channel: 2.2.1-stable

  9. #9
    Sencha - Architect Dev Team
    Join Date
    Aug 2012
    Posts
    9
    Vote Rating
    0
    Davestum is on a distinguished road

      0  

    Default


    Hi allisterv

    I also get an error in Architect when using the setup you described.

    However I was able to get things working when I swapped the username from MellingtonHall to twitterapi.

    So it seems that part of the issue is that there is no data to be displayed:

    PHP Code:
    Ext.data.JsonP.callback1({"completed_in":0.003,"max_id":324241884027449345,"max_id_str":"324241884027449345","page":1,"query":"from%3AMellingtonHall","refresh_url":"?since_id=324241884027449345&q=from%3AMellingtonHall","results":[],"results_per_page":15,"since_id":0,"since_id_str":"0"}); 
    As you can see the results array is empty.

    Can you confirm that a non-empty json array works at your end?

    In the meantime I will issue a ticket to improve the warning text in this situation.

    Thanks

    David
    Dave Stummer
    Sencha Architect Development Team

  10. #10
    Sencha User
    Join Date
    Aug 2011
    Posts
    206
    Vote Rating
    8
    allisterf is on a distinguished road

      0  

    Default


    Hello David,

    It still is failing for me. I changed the twitter search ref to something that has tweets all the time

    Code:
    Ext.define('MyApp.store.TweetStore', {
        extend: 'Ext.data.Store',
    
    
        requires: [
            'MyApp.model.TweetModel'
        ],
    
    
        config: {
            autoLoad: true,
            model: 'MyApp.model.TweetModel',
            storeId: 'TweetStore',
            proxy: {
                type: 'jsonp',
                extraParams: {
                    q: 'to:theoneringnet'
                },
                url: 'http://search.twitter.com/search.json',
                reader: {
                    type: 'json',
                    rootProperty: 'results'
                }
            }
        }
    });
    However, the store still will not load any data using the architect jsonp store config as above. I have a model attached to it.

    Can you check if you have the same? or can you post an equivalent store code (url, root property and extra params is all that's needed) that you find does work?

    Thanks
    Allister

Thread Participants: 2

Tags for this Thread