Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #21
    Sencha User
    Join Date
    Oct 2010
    Posts
    6
    Vote Rating
    0
    Tweak is on a distinguished road

      0  

    Default


    Thanks westy, you saved me a lot of time

  2. #22
    Sencha User
    Join Date
    Nov 2011
    Posts
    77
    Vote Rating
    2
    yAdEs is on a distinguished road

      0  

    Default


    great guy!

  3. #23
    Ext JS Premium Member
    Join Date
    Apr 2008
    Location
    Oslo
    Posts
    64
    Vote Rating
    0
    mikhailt is on a distinguished road

      0  

    Default


    Still there in 4.1.1...
    The issue is that sometimes records[i] is outside of the bounds of the collection.
    here
    Code:
    ns[i].viewRecordId = records[i].internalId;
    It can be fixed with
    Code:
    endIndex = endIndex || ((endIndex === 0) ? 0 : (ns.length < records.length?(ns.length - 1):records.length-1) );
    It is a problem with ItemSelector. Just try to update a store for an ItemSelector then the index records[i] is out of bounds.

  4. #24
    Ext JS Premium Member
    Join Date
    Oct 2008
    Posts
    10
    Vote Rating
    0
    hagak is on a distinguished road

      0  

    Default


    I had to use the override that mkkhailt suggested in order to be able to load a node. I am using EXT JS 4.1.3 which I believe is the latest as of today.

    One clue may be that if didn't seem to happen for nodes that were not that deep. Nodes that were 2 levels done could be loaded fine without the override. Nodes 5 levels down could not. I didn't test what happens for nodes 3 or 4 levels down because my tree isn't setup that.

  5. #25
    Sencha Premium Member
    Join Date
    Dec 2012
    Posts
    2
    Vote Rating
    0
    mgallagher is on a distinguished road

      0  

    Default


    Hi,

    Just keeping this post alive, as I'm still experiencing this problem in 4.1.1a:
    http://jsfiddle.net/beB7N/

    Open the A node, then open the B node.

    The console output is:
    Uncaught TypeError: Cannot read property 'internalId' of undefined

    The error occurs in Ext.view.AbstractView.updateIndexes()

    Thanks
    Mike

  6. #26
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    15,103
    Vote Rating
    97
    evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold

      0  

    Default


    The id's in the tree need to be unique, that's why you're seeing the error.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  7. #27
    Sencha Premium Member
    Join Date
    Dec 2012
    Posts
    2
    Vote Rating
    0
    mgallagher is on a distinguished road

      0  

    Default


    Thanks, you're right, it's not a bug

  8. #28
    Sencha User mono blaine's Avatar
    Join Date
    Jul 2008
    Location
    Turkey
    Posts
    121
    Vote Rating
    7
    mono blaine will become famous soon enough

      0  

    Default


    In my case the problem is caused by some of the suspended store events.

    I had the following code:

    Code:
    store.suspendEvents();
    
    while (store.getCount() > 0) {
        store.remove(store.last());
    }
    
    store.resumeEvents();
    store.fireEvent("datachanged", store);
    grid.getView().refresh();
    My store was a local filtered store so I couldn't use store.removeAll() and also the events happening with respect to the removal of a record were too costly. So I suspended the store events, did what I had to do (later changed this to store.remove(store.getRange())), and resumed the store events. After that, I thought firing the datachanged event of the store and refreshing the grid view was enough in order to make things right.

    It seems it's not. Because as seen below, Ext.view.AbstractView does not listen to the datachanged event of its store.

    Code:
    getStoreListeners: function() {
        var me = this;
        return {
            refresh: me.onDataRefresh,
            add: me.onAdd,
            remove: me.onRemove,
            update: me.onUpdate,
            clear: me.refresh
        };
    }
    Because of my interference with store events, the grid view does not get informed with the record changes, and updateIndexes method fails weirdly.

    I think AbstractView should also listen to the datachanged event of the store.

Similar Threads

  1. Replies: 2
    Last Post: 26 Nov 2007, 5:40 PM
  2. Replies: 3
    Last Post: 17 Nov 2007, 9:27 AM