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.
Comment | File | Size | Author |
---|---|---|---|
#1 | node_import.patch | 1.48 KB | hovel |
node_import.patch | 1.48 KB | hovel |
Comments
Comment #1
hovel CreditAttribution: hovel commentedCorrection. There was a small error in the previous patch.
Attached is the correct one.
Comment #2
BenMirkhah CreditAttribution: BenMirkhah commentedWorks great, thanks.