When I try to add a context, I add any variation of name, condition and reaction, I get the error message: An illegal choice has been detected. Please contact the site administrator.

This happens no matter what I enter for these various field combinations. I have tried this on the 7.x-3.0-beta2 and the latest dev.
I am using the Omega 7.x-3.1 (using a custom sub theme), Drupal 7.13-dev, Sassy 7.x-2.12, Ctools-7.x-1.0.

A sample setting I have tried:
Name: Test
Tag:
Description:
Require all conditions:

Conditions:
Path: test

Reactions:
breadcrumb

Looking at the Log, I see the message: Illegal choice in Select Custom theme settings template. element.

As I said before, this happens on any variation, not when I select the HTML reaction.

I'm pretty stuck at the moment. I also tried to un-install, re-install the module, update to latest dev.

Any suggestions would be appreciated.

Comments

arcane’s picture

I performed a debug back trace and got:

An illegal choice has been detected. Please contact the site administrator.
Array
(
[0] => Array
(
[file] => /var/www/chinafile7.drupalnyc.com/public_html/includes/form.inc
[line] => 1581
[function] => drupal_set_message
[args] => Array
(
[0] => An illegal choice has been detected. Please contact the site administrator.
[1] => error
)

)

[1] => Array
(
[file] => /var/www/chinafile7.drupalnyc.com/public_html/includes/form.inc
[line] => 1628
[function] => form_set_error
[args] => Array
(
[0] => reactions][plugins][delta][delta_template
[1] => An illegal choice has been detected. Please contact the site administrator.
)

)

[2] => Array
(
[file] => /var/www/chinafile7.drupalnyc.com/public_html/includes/form.inc
[line] => 1318
[function] => form_error
[args] => Array
(
[0] => Array
(
[#type] => radios
[#title] => Select Custom theme settings template.
[#description] => There are no valid (enabled) Delta templates available.
[#default_value] =>
[#options] => Array
(
)

[#input] => 1
[#process] => Array
(
[0] => form_process_radios
)

[#theme_wrappers] => Array
(
[0] => radios
[1] => ife_form_element
)

[#pre_render] => Array
(
[0] => form_pre_render_conditional_form_element
[1] => ctools_dependent_pre_render
)

[#defaults_loaded] => 1
[#tree] => 1
[#parents] => Array
(
[0] => reactions
[1] => plugins
[2] => delta
[3] => delta_template
)

[#array_parents] => Array
(
[0] => reactions
[1] => plugins
[2] => delta
[3] => delta_template
)

[#weight] => 0
[#processed] => 1
[#required] =>
[#attributes] => Array
(
)

[#title_display] => before
[#id] => edit-reactions-plugins-delta-delta-template
[#name] => reactions[plugins][delta][delta_template]
[#has_garbage_value] => 1
[#needs_validation] => 1
[#value] =>
[#sorted] => 1
)

[1] => An illegal choice has been detected. Please contact the site administrator.
)

)

arcane’s picture

I tried adding a delta template, but that didn't work. I disabled the delta module and the problem went away.

likewhoa’s picture

Version: 7.x-3.0-beta2 » 7.x-3.x-dev
Category: support » bug

same here with -dev modules.

likewhoa’s picture

Status: Active » Closed (cannot reproduce)

I can no longer reproduce this in -dev, closing.

likewhoa’s picture

Status: Closed (cannot reproduce) » Active

reopening and figured out what causes this. delta api module causes this issue and when disabled the problem goes away.

likewhoa’s picture

ok after a little trial and error, I figured out that you can save 'new' context *only* and continue to save new ones if you select the 'delta' action otherwise you run into the

An illegal choice has been detected. Please contact the site administrator.

error message which prevents you from saving the context. This is with all the delta modules enabled by the way.

waverate’s picture

I have the same problem.

#6 is a temporary workaround.

seanberto’s picture

Status: Active » Closed (duplicate)

Not a context bug. The patch to Delta in #1512744: Saving Context Issue because no Delta template has been saved. seems to fix this.

jpwarren00’s picture

Version: 7.x-3.x-dev » 7.x-3.0-beta2
Issue tags: +work around

A non code workaround for this issue is to have a default Delta that doesn't implement any theme changes chosen when creating contexts. Annoying but avoids playing the out of development stream patch game.

emudojo’s picture

subscribing. I was able to reproduce this with the latest delta + context. and indeed adding a default delta fixed it for me.

daniel wentsch’s picture

Yea, same issue with Context 7.x-3.0-beta3 and Delta 7.x-3.0-beta9, likewhoa's workaround in #6 works, though.

OldAccount’s picture

Confirmed, the patch for #1512744: Saving Context Issue because no Delta template has been saved. mentioned in #8 fixes the issue without having to add a default/blank Delta.