Hi,

if I enable Node_Type_Filter, and then try alter content in content admin section (/admin/content/node), like publish/unpublish, delete, etc., I got "An illegal choice has been detected. Please contact the site administrator." error. If Node_Type_Filter is disable, these actions can be made without any error.

Comments

nancydru’s picture

Assigned: Unassigned » nancydru

I will look into this, but the module shouldn't even be at play there.

mooffie’s picture

(I'm ariving here by a post on the forum.)

I'm not using this module, but I had a quick look and I see that it uses $_REQUEST['type']. I believe this should be changed to $_GET['type'] or else --if the form happens to have a 'type' field already, which might very well be the case for the 'admin/content/node' form-- weird things could happen.

nancydru’s picture

Thank, Mooffie.

nancydru’s picture

Status: Active » Fixed

I was able to reproduce the problem, and Mooffie's suggestion worked. I would never have found that, so Mooffie saved me again.

Strange that this did not happen in 5.x.

john.karahalis’s picture

Good call, mooffie. Thanks alot.

john.karahalis’s picture

I just installed the 6.x-dev branch (which changes $_REQUEST to $_GET), but the bug remains. It's doesn't seem to have anything to do with the form_build_id value as I originally thought, and it seems that it doesn't have anything to do with $_REQUEST either.

I've tried dis/re-enabling the module but even after that the error message returns.

nancydru’s picture

Status: Fixed » Needs work

Hmm, I was able to reproduce the problem and it went away after the fix. Did you look at the code to make sure you got the change?

john.karahalis’s picture

Yes the code did change, and $_GET is now being used but the bug remains. For some reason, I am able to delete content but nothing else.

nancydru’s picture

Hmm. I'll do some more digging. I was able to reproduce the problem and was able to do everything after fixing it.

john.karahalis’s picture

Hi. Just letting everyone (especially nancyw) know that the new version -does- now work for me. I don't know why it continued to act buggy for a while after being updated. Maybe it had something to do with caches or some other obscure Drupal tomfoolery 8)

Anyway, it's working now, and it does seem to be as a result of the $_REQUEST fix. Good work everyone and thanks alot.

nancydru’s picture

Status: Needs work » Fixed

Great, thanks for the update.

john.karahalis’s picture

update:

Now it's not working again. Very strange. I have tried uninstalling/reinstalling the module and still have the problem.

nancydru’s picture

Status: Fixed » Needs work
john.karahalis’s picture

I saw that you just changed the status to fixed. It turns out I am still having the problem after all. I don't know why the bug subsided briefly, but it's back.

nancydru’s picture

I cahnged it to fixed when you said it was working. When you then said it was not, I changed it to PCNW.

nancydru’s picture

I just did this with multiple nodes, using "publish," "unpublish,", "promote," and "delete." They all worked fine.

Are you using an access control module or something else that also uses hook_db_rewrite_sql?

john.karahalis’s picture

I previously had node_type_filter installed in my .../sites/all/modules/node_type_filter directory. Despite updating the module in that directory, the bug remained.

I just realized that .../sites/all/taxonomy_browser contains its own copy of /node_type_filter, presumably the version that still had the bug.

Hopefully if I update the .../taxonomy_browser/node_type_filter directory with the new version of the module, the bug will be fixed completely. Right now I am having hosting issues and so cannot test this, but I will report back shortly.

nancydru’s picture

Did you put that extra copy there, or did it somehow get distributed that way?

john.karahalis’s picture

I'm fairly certain I put that copy there accidentally.

I completely removed Taxonomy Browser and Node Type Filter (both copies), and then reinstalled each. Still receiving the error.

I wouldn't be too concerned though. It seems that the fix is working for everyone else. More than likely, I am either doing something wrong or broke Drupal in some way (maybe with another module or theme). I'm more than willing to help you in whatever way possible, but like I said it seems that this bug is now unique to me.

nancydru’s picture

Well, I have no idea how many "everybody else" is - as far as I know you and I may be the only ones using it. So that makes you important.

So let's start with the $Id line in the module. And verify that this change got made to your current copy, please.
My code shows v 1.2.2.1.2.2.2.2 2008/03/21.

john.karahalis’s picture

Success!!!

Apparently I have been using v 1.2.2.1.2.2.2.1 2008/01/25 19:32:14 during my testing today. This is the version which is available for download on the module's page, http://drupal.org/project/node_type_filter.

After manually changing $_REQUEST to $_GET, everything now works perfectly!

It seems that I was encountering two problems here, $_REQUEST and the multiple copies of the module. A couple of weeks ago I fixed $_REQUEST, but that edit was apparently reversed when I reinstalled the module (unknowingly to 1.2.2.1.2.2.2.1). It wasn't until just now that BOTH problems were corrected. As such, it wasn't until just now that the problem was completely resolved.

Thanks for keeping in contact with me and working with me to get this issue resolved. Keep up the great work...and fix that link!

"given enough eyeballs, all bugs are shallow"
-Eric S. Raymond, Open Source Software advocate

nancydru’s picture

Oh, I guess I wasn't clear. When I make changes, they are always to the -dev version. After I've made a few changes and people have tested them, then I roll up a new official version. Please try the -dev version.

john.karahalis’s picture

Yes, the -dev version seems to work great. Sorry about the confusion.

nancydru’s picture

Status: Needs work » Fixed

Great.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.