Today i got this error: An illegal choice has been detected. Please contact the site administrator.
This error occures when the following conditions are met:
1 You are using node titles to reference nodes.
2 There are multiple nodes with the same title.
3 The first one is not a referenceable one.

I my case i have nodes with the same title but in different content types. I need this import so i created this solution:
Restrict the check for the node-id of the referenced node to the content types that are allowed for the nodereference field.

Attached is a patch that solves this problem.

p.s. There is no solution when there are the same titles in the same content type.

CommentFileSizeAuthor
#1 node_import.patch1.48 KBhovel
node_import.patch1.48 KBhovel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hovel’s picture

FileSize
1.48 KB

Correction. There was a small error in the previous patch.
Attached is the correct one.

BenMirkhah’s picture

Issue summary: View changes

Works great, thanks.