Problem/Motivation

When you have a Node Reference field using the extra 'Search and Reference view' and a module that implements hook_form_alter is enabled, and you create or edit a node and use the 'Search and reference multiple items at once...' button, after you select the items in the modal frame and hit 'Save' you get the following error:

warning: Parameter 2 to arrange_fields_form_alter() expected to be a reference, value given in /path-to-site/includes/common.inc on line 2930.

To reproduce:

  • Install a clean copy of Drupal 6.25
  • Enable the noderelationships module and all required modules.
  • Enable one module that implements hook_form_alter (arrange_fields, date, date_timezone, gmaps, location, wysiwyg are a few that I noticed)
  • Create a content type and add a node reference field with autocomplete widget.
  • Have the field reference nodes of type 'page'.
  • Go to the relationships section of the content type
  • Under Node reference Extras, select 'Table Style' for the Search and reference view
  • Create 1 or more page nodes
  • Create a node of the type that has the node reference and click on the 'Search and reference multiple items...' button.
  • Select the nodes you created
  • Hit the save button

Proposed resolution

No idea where to start looking on this, but it looks like somehow a module_invoke_all for hook_form_alter is being called and not all the correct information is being passed.

Remaining tasks

Figure out where the error is coming from.

User interface changes

API changes

Original report by compsyguy

Comments

markus_petrux’s picture

Status: Active » Fixed

It should be fixed with the following commit:

- http://drupalcode.org/project/noderelationships.git/commit/27ef84a

compsyguy’s picture

That seems to have fixed it!

Thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.