Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-9008

Ext.grid.header.Container multiple logs in solr search

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.1.0
    • 4.1.0
    • None
    • None
    • 4.1RC1
    • 4.1 RC2

      When searching in Solr (sometime on 1st search, but always on next searchs) there is the following warning message multiple time (once per column displayed)

      Note : this only appears in development mode

      [W] Ext.grid.header.Container attempted to reuse an existing id: title
      

       

          [CMS-9008] Ext.grid.header.Container multiple logs in solr search

          I think it is an ExtJS bug

          Indeed, in src/panel/Table.js in lines 2253 and 2254 in reconfigure method, ExtJS does

          headerCt.removeAll();
          headerCt.add(columns);
          

          nothing wrong here

          but if we investigate deeper, in src/grid/header/Container.js in line 787 in onRemove method it does

          delete me._usedIDs[c.headerId];
          

          whereas in line 702 in onAdd method, it does

          var stateId = c.getStateId();
          if (me._usedIDs[stateId] && me._usedIDs[stateId] !== c)
          

          So in my opinion, there is here a problem of consistency with the keys of the cache object _usedIDs. The onRemove method should do

          delete me._usedIDs[c.getStateId()];
          

          So I propose to open an issue for ExtJS + the workaround in the attached branch

          Simon Prieul (Inactive) added a comment - I think it is an ExtJS bug Indeed, in src/panel/Table.js in lines 2253 and 2254 in reconfigure method, ExtJS does headerCt.removeAll(); headerCt.add(columns); nothing wrong here but if we investigate deeper, in src/grid/header/Container.js in line 787 in onRemove method it does delete me._usedIDs[c.headerId]; whereas in line 702 in onAdd method, it does var stateId = c.getStateId(); if (me._usedIDs[stateId] && me._usedIDs[stateId] !== c) So in my opinion, there is here a problem of consistency with the keys of the cache object _usedIDs . The onRemove method should do delete me._usedIDs[c.getStateId()]; So I propose to open an issue for ExtJS + the workaround in the attached branch

          I'm quite sure we are getting this logs when doing

          this.grid.reconfigure(this.store, columns);

          So, every time we click the search button after changing the "columns" criterion

          Simon Prieul (Inactive) added a comment - I'm quite sure we are getting this logs when doing this .grid.reconfigure( this .store, columns); So, every time we click the search button after changing the "columns" criterion

            sprieul Simon Prieul (Inactive)
            pgros Pierre Gros (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: