Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Assigning OG audience during import fails validation, producing the error: An illegal choice has been detected. Please contact the site administrator.
The symptom is the node preview looks like this:
[og_groups] => Array
(
[5550] => 1
)
whereas it would be correct like this
[og_groups] => Array
(
[5550] => 5550
)
This may be relevant only to OG 1.x, I'm not sure.
Comments
Comment #1
alex.k CreditAttribution: alex.k commentedAttached patch fixed it for me.
Comment #2
hurricane66 CreditAttribution: hurricane66 commentedThe patch in #1 solved the import fail experienced when OG audience was included with node data (message in the Drupal log is "An illegal choice has been detected. Please contact the site administrator.").
Our setup in short:
drupal 6.27
node import 6.x-1-1 (2011-mar-23)
og 6.x-2.1