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.
Comments
Comment #1
hovel commentedCorrection. There was a small error in the previous patch.
Attached is the correct one.
Comment #2
benmirkhah commentedWorks great, thanks.