I can't get more than one node reference to work correctly. When creating more than one node reference, any reference other than the first return a "an illegal choice has been detected" error when using the "search & reference" feature.

Example:
The parent node is "Events". The two referenced nodes are "films" and "event_details", created in that order. When using search & reference to attach an "Event Details" node to "Events", I get the error message. Watchdog's message is: "Illegal choice films in type element".

Is this telling me that the form thinks it's dealing with the "film" node when it's actually supposed to be dealing with "event_details"?

I've read this similar issue: (http://drupal.org/node/866206), but I'm not logging in-and-out as described in that post.

I have a very basic install, the correct jquery UI (1.7.3) and have experimented with turning off all non-essential modules (and using the Garland theme), without any success. I've read everything else I can find about this error message, but nothing jumps out to me as a solution.

I'm stumped!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sdowney2002’s picture

Status: Active » Closed (fixed)

du'oh. Never mind, issue resolved. I simply uninstalled, then reinstalled "Views". Cleared the issue.

chromix’s picture

Another way to fix this issue: edit the noderelationships_noderef view, click on the node type filter, uncheck "Remember" and then update and save. Clear your views cache and this error should go away.

chromix’s picture

Status: Closed (fixed) » Active

Actually, the solution I posted doesn't work. This error is also being reported elsewhere:
http://drupal.org/node/961488
http://drupal.org/node/684082
http://drupal.org/node/866206

I think this is a larger problem with the module which needs to be addressed, unless this has already been fixed elsewhere? I'm using Views 6.x-2.12, Node Relationships 6.x-1.6, jQuery UI 6.x-1.4, jQuery Update 6.x-2.x-dev, Modal Frame API 6.x-1.7.

chromix’s picture

Also noting this is an error that typically happens when two views are displayed on the same page. I'm using 2 different node reference fields on the same node type, each of which pick different node types, so that must be the problem. Hiding the exposed type filter removes the error, but I'd like to find a better solution.
http://drupal.org/node/347590

chromix’s picture

Version: 6.x-1.6 » 6.x-1.x-dev
Category: support » bug
FileSize
1.16 KB

This patch fixed the bug for me. Apparently all you have to do is ensure that each exposed type filter has a unique identifier. I accomplished this by just modifying each identifier from 'type' to 'type_field_name'.

chromix’s picture

Status: Active » Needs review
FileSize
1.38 KB

Sorry guys... the original patch won't work with customized views. Use this one instead.

janisto’s picture

Thanks for saving my day chromix, your latest patch solved my issues with two node reference fields.

feedbackloop’s picture

Thank you, chromix... that would've been a pain for me to track down!

thijsvdanker’s picture

Status: Needs review » Reviewed & tested by the community

Thanks Thomas, patch works like a charm.

markus_petrux’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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