Not sure if this is a context issue or a delta issue.
Running 7.x-3.0-beta2+11-dev and 7.x-3.0-beta9.
When I try to create any context, I get the error An illegal choice has been detected. Please contact the site administrator. After running a debug backtrace on context form, I get:
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.
)
)
[3] => Array
(
[file] => /var/www/chinafile7.drupalnyc.com/public_html/includes/form.inc
[line] => 1275
[function] => _form_validate
[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
)
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | i1512744-28.patch | 906 bytes | attiks |
| #4 | delta-context_fix_form_validation-1512744.patch | 2.13 KB | hles |
Comments
Comment #1
arcane commentedWhen i disable the Delta module, the problem goes away. I am using Omega sub theme.
Comment #2
seanberto commentedI can replicate this on the latest stable releases of Delta, Context, CTools, and an Omega subtheme.
Comment #3
seanberto commentedInterestingly, I can save a context when editing it and deleting the Delta reaction settings. But then, if no Delta reactions are set when I try to resave (or when saving a new context), it fails.
Comment #4
hles commentedThe problem comes from the form validation when using radios buttons because there is no value to validate/submit.
The following patch fixes the problem by always using a select instead of radio buttons or select in function of the number of templates, which I don't find really useful anyway. Patch also contains some small code formatting fixes, my IDE does that automatically, but I guess it's OK.
Comment #5
LiveWire commentedAwesome! Patch in #4 works for me. Thanks!
Comment #6
waverate commentedPatch #4 works.
Comment #7
Kendall Totten commentedPatch #4 worked for me too, thanks!!
Comment #8
pierremarcel commentedI also confirm that patch #4 works, thanks for the fix!
Comment #9
danny englanderThe patch in #4 worked for me to fix this issue though I got these errors when I applied the patch:
However, in fact it did apply and when I checked my diff file in git, all the changes seemed to have applied. Thanks.
Comment #10
divbox commentedpatch # 4 works for me as well. thank you!
Comment #11
hles commentedThis solution works because it replaces radio buttons by a select. Just want to mention that there is a ongoing core issue #811542: Regression: Required radios throw illegal choice error when none selected that will eventually fix this issue without even patching delta.
Comment #12
DaveLindberg commentedAdditional confirmation: patch #4 did the trick. Many thanks.
Comment #13
muranod commentedAny way I could get the actual patched file? I've repeatedly tried doing it myself, but can't get it to work (too new at this, I guess). I've had to disable the Context module, but I would really like to re-enable and use it.
Thanks much,
Dan
p.s. Searching brings up a number of the same error being thrown up, some for the Flag module, since the update to 7.14. Is this a core issue, a context module issue or something else?
Comment #14
RKopacz commentedDoes anybody know if this patch has been committed to the dev version of Delta? I'm not too good with patches.
Comment #15
attiks commentedI posted a patch in #811542-188: Regression: Required radios throw illegal choice error when none selected, but need some contrib modules to test this.
Comment #16
muranod commentedWondering - is it possible to go back to v. 7.13 from 7.14 until all these related issues are solved? (installing 7.13 and then running update.php).
Comment #17
Robin Millette commented@muranod Unfortunately, update.php doesn't work in reverse.
Comment #18
hdennen commented@muranod
I tried using cygwin for my local environment but it borked my site, ended up doing it manually.
open the patch, at the top it will say what file is being edited. Pretty sure it's modules>delta>plugins>context>context_reaction_delta.inc
make a copy for back up, then just edit the .inc file manually according to the patch file, i.e. delete where - and add where +.
bonus tip: start from the bottom so the line numbering stays correct.
Also, patch does work.
Comment #19
attiks commentedThis line is probably causing the problems, try changing '' to NULL
Comment #20
muranod commented@hdenned, attiks: Awesome. I will try both of these (patching first) as soon as I can get back to my localhost site tomorrow.
Thanks so much!
Dan
Comment #21
dman commented#19 works for me. Looks like a good fix.
Comment #22
muranod commentedI imagine I'll be more savvy at this in six months or so, but my skills aren't there yet.
Started working from the bottom up context_reaction_delta.inc / delta-context_fix_form_validation-1512744.patch
Got lost very quickly. Some of the lines with a minus are the same as the ones with a plus and all I get from the various patch tools (Windows) is error messages.
I'll wait for the next module update to try the context module again, but just wondering why patched versions aren't available somewhere ahead of an update? (dang -- I had just gotten down to my last three Drupal core-placed blocks when 7.14 came!)
Thanks for all your help everyone.
Comment #23
dman commented@muranod I appreciate that it seems - on the surface to be able to provide 'patched' versions of any and every available patch, but if you have time to look at some of the discussions that have happened before, Supplying Patched versions is by design not something that is supported for users that can't do it themselves. It frankly can drop any user into a hole too deep for them to dig themselves out of. And that not even a guru can get them out of without wiping and starting again. If you have solutions to that, see those discussions.
HOWEVER - the way forward is for a few of us to chime in, show interest, try it out (those of us who safely can) and volunteer help.
This is a patch that appears to be on the critical path (IMO anyway) and just requires maintainer fold-in.
It's allegedly stalled because a better more all-purpose patch in core may save the same problem. However, this work-around is clean, and not clutter by any means.
It does make context unusable, so I'll bump the priority - actually doing the one line patch in #19 is easier for the dev to do directly (in this case)
Comment #24
muranod commented@dman That makes sense. I did do a full backup before 7.14 and could have restored, but it's too late to do that now because of other changes I've made. Embarrassed to admit this, but I didn't know where to put the 'NULL' value in # 19.
Glad to hear the issue is getting bumped. I'm only about 7 months into Drupal, but have found CONTEXT to be invaluable, and I also am very comfortable with Omega and the Delta module.
I would be happy to help in any way, but probably don't yet know enough to offer much.
Dan
Comment #25
CLEE25 commentedPatch wasn't working for me (whitespace errors). Changing '' to NULL as outlined in #19 worked for me.
Comment #26
dwatts3624 commentedPatch #4 works great!
Comment #27
muranod commentedFinally got it. Did not have to add a "NULL" anywhere. I downloaded NETBEANS and followed the three very straightforward steps here: http://drupal.org/node/60179.
Hope this helps anyone else who is having trouble patching.
Also, there are 4 versions of NETBEANS (all free, but of varying file sizes). Does anyone know the minimum version necessary to apply patches to Drupal modules? I installed the PHP version, 47MB.
CONTEXT is working fine now, and with the Delta module enabled. Thanks to everyone who helped.
Dan
Comment #28
attiks commentedPatch for #19
Comment #29
klausi#28 fixes the problem.
Comment #30
slucero#28 has fixed the issue on several installations for me.
Comment #31
javiereduardo commented#28 works for me.
Comment #32
doublejosh commented#28 works for me as well.
Comment #33
traveller commented#28 works for me as well.
Comment #34
kevinquillen commented#28 works. I think this should be rolled into a new release. All contexts are broken (for me) without it.
Comment #35
joemoraca commentedthe change in 19 worked for me
Comment #36
kingfisher64 commented#4 worked for me. Rather than just applying fixes from this thread I think the calls for a new release are with merit.
Comment #37
attiks commentedMoving this to context since the patch in #28 is against context
Comment #38
nuezPatch #28 worked for me, against Delta, moving back to delta,
Comment #39
seanberto commentedThis is pretty clearly a Delta bug, nuez is right.
Comment #40
attiks commentedMy bad, sorry
Comment #41
jdanthinne commented#28 Working for me as well. Please commit.
Comment #42
himerus commentedThis is now committed to 7.x-3.x-dev version and should be available in the download package... new tagged release will follow "soon".
Thank you for the report and the patch.