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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

_randy’s picture

Seeing this issue as well. The issue happens in node_form.js.

In the updateMultipleValues method there is a for loop:

for (var nid in selectedItems) {
            self.selectedItems[fieldOptions.fieldName].push(selectedItems[nid]);
        }

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.

_randy’s picture

Issue summary: View changes
FileSize
1.45 KB

Attached is a patch that may help alleviate this issue. It would appear that this does indeed solve the issue for IE and Chrome.