Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-14432

Experience Manager: natural group ordering only works in Firefox

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • 13.4.7, 14.4.0
    • None
    • channel-manager
    • Flagged
    • Orion
    • Ready for refinement

    Description

      There's this piece of Ext code in file community/channel-manager/frontend/src/main/resources/org/onehippo/cms7/channelmanager/channels/ChannelIconPanel.js:

      // create non associative array
      dataObject = [];
      
      Ext.iterate(groups, function(groupId, group) {
       group.channels.sort(function(channel1, channel2) {
       return channel1.name > channel2.name;
       });
       dataObject.push(group);
      }, this);
      
      dataObject.sort(function(group1, group2) {
       return group1.name > group2.name;
      });
      

      The sorting logic works on Firefox 85.
      It does not work on Chrome 88, Edge 88.

      (apparently sorting arrays is known to be different across browsers).

      Reproduction

      Visit https://cms.demo.onehippo.com with Chrome and with Firefox, open the Experience Manager's, icon panel, see the differences.
      See 

      Suggested solution 
      In a client case with an extra customization, the sorting is actually not wanted, so the request is to just remove the sorting code, resulting in the same behavior across browsers.

      As extra, we can make the sorting work for all browsers but then optional.

      Attachments

        1. CMS-14432.png
          295 kB
          Jeroen Hoffman

        Activity

          People

            Unassigned Unassigned
            jhoffman Jeroen Hoffman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: