I deleted the filtered-HTML filter on my (Drupal 5.2) site, then made a minor edit to an existing view. When I tried to save it, it threw six errors, all saying:

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

Scrolling down the unsaved form, I saw that every "Input format" fieldset was uncollapsed.

It looks like this error was actually thrown by filter.module (around line 850): presumably because it was asked to save a filter selection that no longer exists? or a blank filter selection?

What would be the best way to resolve this? I don't know whether this issue should be under views or under filter, as the latter project might argue that it's working as designed. Feel free to reassign projects if you think it's a filters bug.

CommentFileSizeAuthor
#4 patch_menu_inc_0.txt633 bytesjp.stacey
#3 patch_menu_inc.txt633 bytesjp.stacey

Comments

merlinofchaos’s picture

My guess is that you need to go through each of the textareas on the view and make sure that the input filter for that textarea is now valid.

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

When you've done that, please either change this issue to active (if it didn't fix it) or fixed.

jp.stacey’s picture

Status: Postponed (maintainer needs more info) » Active
StatusFileSize
new633 bytes

Thanks for the feedback. My issue isn't that what you suggest doesn't fix it - it did - it's that one module has changed something under another module and some quite obtuse error messages are then thrown rather than the modules reacting properly to each other's behaviour.

I'd argue that either the views or filter module should detect that the relevant filter no longer exists when the form is shown to the user, and at the least warn the user before form submission rather than throwing six identical errors afterwards. In fact, given that (I think) on the filter delete page there's a warning saying that all content with the to-be-deleted filter type will have their type reset to the default, then arguably the view-edit form should be doing that, and might not even need to tell the user it's done it.

In brief: it's a useability bug rather than a functionality bug.

jp.stacey’s picture

StatusFileSize
new633 bytes

Ignore the patch: I was uploading it for another issue which I'm still previewing in a separate window, but Drupal stuck it on this one. Hm.

merlinofchaos’s picture

Assigned: Unassigned » merlinofchaos

Bizarre about the patch.

And you have a fair point about the usability bug.

merlinofchaos’s picture

Status: Active » Closed (won't fix)

This won't be fixed in Views 1.