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
    17,004
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      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
    123
    Vote Rating
    8
    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.

  9. #29
    Sencha Premium Member Zdeno's Avatar
    Join Date
    Nov 2009
    Location
    Prague
    Posts
    402
    Vote Rating
    17
    Zdeno will become famous soon enough

      0  

    Default


    I think this could be classified as a bug. I use ExtJS 4.2.2.1144 and I'm overriding app from ExtJS 3. Data received from server are saved to single store which use following models. Data are displayed in Ext.view.View

    Code:
    Ext.define('Ticket', {
        extend: 'Ext.data.Model',
        fields: [
            'id',
            'subject',
            ...
        ],
        associations: [
            {
                type: 'hasMany',
                model: 'Message',
                name: 'messages',
                primaryKey: 'id',
                foreignKey: 'ticket_id'
            }
        ]
    });
    Code:
    Ext.define('Message', {
        extend: 'Ext.data.Model',
        fields: [
            'id',
            'ticket_id',
            'content',
            ...
        ],
    });
    Data received from server:

    Code:
    "id": 1,
    "subject": "Subject",
    ...
    "messages": [{
        "id": 2,    
        "content": "Assigned to: Administrator, System"
        ...
    },
    {
        "id": 1,
        "content": "AAA"
        ...
    }]
    As I wrote above, data are stored in single store and use different models. When I use westy's override data are displayed properly. However when you want use itemcontextmenu, only one of messages can be selected.

    Here is broken test case: http://jsfiddle.net/2KswB/1/

    Looks like the view does not count with anything else then simple array of records. However this test case works well in ExtJS 3

  10. #30
    Sencha Premium Member Zdeno's Avatar
    Join Date
    Nov 2009
    Location
    Prague
    Posts
    402
    Vote Rating
    17
    Zdeno will become famous soon enough

      0  

    Default


    Bump. Any hint how you can solve this issue until i find some time to check the code?