I updated core to 7.14 this morning and have since not been able to save any changes to contextual filters in views.

I can open the pop up window to edit but clicking Apply results in the 'An illegal choice has been detected. Please contact the site administrator.' error message.

All views still seem to function correctly, I just can't edit contextual filters in the UI.

I've checked that it's definitely related to the core update, I have a copy of the site I'm working on which has otherwise been untouched today. Checked the views UI was working - it was - updated core, same issue.

Anyone else experiencing this?

CommentFileSizeAuthor
#24 screen_context_error.jpeg99.85 KBShedPhotons

Comments

andykisaragi’s picture

Watchdog says 'Illegal choice *relationship* in Flag element.'

greta_drupal’s picture

Confirming same. Site was working fine until I updated to 7.14. Did nothing on the site but the update. I too have error-producing view with both contextual filter(s) and relationship.

Tried to narrow the problem a bit futher, but remove the relationship -- it re-appears. I removed it (once by clicking the relationship name link then clicking the REMOVE button; also tried selecting Rearrange, then clicking the "remove" link on that table), but then when I saved the View, it re-appeared. So, the remove didn't take.

Frustrating. Even just a quick patch would be most appreciated. (I'd do it if I was capable.)

david_r_moore’s picture

I also have the same issue. Within a Block display, changing the contextual filter results in "An illegal choice has been detected. Please contact the site administrator".

jibran’s picture

Same error here.

abubakarshams’s picture

Same error on my site

Mujtaba Ahmed’s picture

Having same issue.

dawehner’s picture

Priority: Normal » Major

*Ouch* That's definitive at least a major problem ...

So i updated my dev installation to 7.14 and played around with contextual filters, but hey everything still works.
I fail on all areas of reproducing bugs ...

Can someone try to give an easy way to reproduce that problem? Just something like that

* add a new view of type node
* add a contextual filter FOO etc...

dawehner’s picture

Just a link to a somehow related issue on drupal itself: #811542: Regression: Required radios throw illegal choice error when none selected

muranod’s picture

Same issue here. Also reported it on http://drupal.org/node/1560062. Users reporting issue with both context and comments. Mine seemed to be with Context and Delta front, but may extend to the rest of the site as well (i have run out of time to test after replacing Context with Drupal's block placement).

Updated from 7.12 to 7.14.
Omega theme, Delta homepage with Views blocks placed by Context.

Can't edit contexts without the illegal choice error.

After further testing, does not seem to be an Omega / Delta issue. I cannot create or edit contexts. I get the "illegal choice" error and the context won't save.

All worked perfectly before the update. Ran database updates again just to be sure -- no difference.

shakman’s picture

Same issue. Steps to produce is pretty straightforward:

  1. Login with a user that is an administrator
  2. Create a new view selecting content (go with the defaults)
  3. Add a contextual filter selecting any field (doesn't matter which)
  4. Change any parameter and click Apply

Changing a parameter causes this error to pop up. If you go with the defaults, all goes fine.
I don't think this is related with the theme.

rteuber’s picture

Same issue.

In addition to #10

If you have already a contextual filter then a second one in the same view is only saved with the error message even if you go with the defaults.

dawehner’s picture

I still wasn't able to reproduce the problem. Both with 7.x-3.x and 7.x-3.3 i could save multiple changed contextual filters ...

My core version is at 7.14, so this shouldn't be a problem ... I fear though that this is more a core issue.

lakshminp’s picture

The patch in comment #2 of http://drupal.org/node/1484352 seems to solve the issue.

greta_drupal’s picture

Ref #13 patch seems to have resolved for me, as well. I have the Flag module enabled, applicable to the content of the "breaking" view.

shakman’s picture

Ref #13 patch resolved this issue.

Thanks lakshminp.

dawehner’s picture

Status: Active » Closed (duplicate)

So this is now really a duplicate of #1484352: Illegal choice *relationship* in Flag element causes Views contextual filters to fail

Thanks lakshminp for finding the issue in flag! This really helped people

greta_drupal’s picture

Yeah, seriously a good get. Saved me a bunch of time.

andykisaragi’s picture

yep, confirming patch in #13 seems to solve the issue. Thanks lakshminp!

muranod’s picture

I don't have the flag module enabled or installed. I also can't seem to apply the patch (my skills aren't there yet). Tried TortoiseSVN and a few GnuWin32, but both keep throwing back errors. I would love to have the context module available again.

andykisaragi’s picture

muranod, the patch is for the flag module so if you don't have it on your site then the patch will definitely fail..!

It sounds like you must be experiencing a different root issue if you're seeing this error without the flag module installed.

muranod’s picture

You're right. Sorry about that. I had tried another patch for Omega theme's Delta module, but I could not get that to work. Same scenario, different module affected. Like everyone here, started with the 7.14 update. So, is this something in core, or something in the way the Context module operates? I had to disable it.

andykisaragi’s picture

The specific issue I had (and by the sounds of it most others who have commented) is not related to the context module (I'm not using it). It seems to be a combination of the Flag module and the 7.14 core upgrade.

I believe the 7.14 was mostly security related & tightened up some form stuff, so it seems plausible that it may have affected several modules including context.

joshuautley’s picture

I can confirm the issue exists with Drupal 7.14 and Flag module. After disabling the Flag module I can once again edit/create Contextual Filters with an option other than "Display all results for the specified field". And there is no more "Illegal operation" error.

ShedPhotons’s picture

StatusFileSize
new99.85 KB

Not using flag module, but still have this issue after the 7.14 update. Using OpenPublish distribution with Omega and Display Suite.

Opened up the “blocks” reaction to edit it, re-locating some content from content zone to sidebar-second zone. Attempting to save spawns the error: "An illegal choice has been detected".
The blocks location mechanism uses an array of checkboxes to select and assign - the most likely relationship to this bug.

andykisaragi’s picture

ShedPhotons, Looks like it may be caused by the same root issue in core but your bug probably belongs in the Context issue queue?

ShedPhotons’s picture

Thank you. Wasn't sure where to post it. Note: Solved this by disabling Delta (under Omega theme module).

mr.marlin’s picture

I had the error too when trying to update a context (after updating to 7.14) which was related to the Delta module. I saw on a thread where it was advised to add the Delta option to the reaction. Then delete it later. That didn't work, but what did work was adding the delta to the reaction, and saving it. So what I had to do was in Delta, add a new snapshot of my base sub-theme. Go back into structure/context, and edit or create a new context with what ever options you want, but the Delta has to be a part of one of your choice reactions, with either your custom delta snapshot, or the base sub-theme delta selected. And now I can save without error.

Administration/Reports:
"http://localhost:8082/admin/structure/context/add" + "Illegal choice in Select Custom theme settings template. element." = error

joelrotelli’s picture

The flagg module was also the problem for me. Thanks