Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When we add nodes over the "Search and reference multiple items at once" dialog and sort the selected nodes in the modal window, the order is not sent correctly to the node edit form (see the screenshots).
It works with Firefox but not with Chrome and IE. In Chrome and IE it seems the order is always the node id.
Comment | File | Size | Author |
---|---|---|---|
#2 | search_and_reference-1947546-2.patch | 1.45 KB | _randy |
ArtikelZumThema5.png | 209.68 KB | weri | |
ArtikelZumThema3-4.png | 265.73 KB | weri | |
ArtikelZumThema1.png | 203.29 KB | weri |
Comments
Comment #1
_randy CreditAttribution: _randy commentedSeeing this issue as well. The issue happens in node_form.js.
In the updateMultipleValues method there is a for loop:
It would appear that in Chrome and IE, the selectedItems object is always coming in as sorted... There really isn't anything that we can do here other than go back up the chain and try to add those selected item nids in to an array with a strongly keyed index.
Comment #2
_randy CreditAttribution: _randy commentedAttached is a patch that may help alleviate this issue. It would appear that this does indeed solve the issue for IE and Chrome.