I can't enable and disable blocks in my 4.7.x and 5.x sites. I'm not sure if this happened when I upgraded from 4.6 to 4.7. Any ideas what's wrong?

Thanks in advance!

Comments

gpk’s picture

I've very occasionally hit problems like this and never really got to the bottom of it. Make sure you are saving the block settings for the right theme (they are saved per-theme). I found that if I re-saved the actual block then I could get the other settings to stick better. Also you might want to have a look in the {blocks} table. You can even edit the values there directly if necessary.

I also remember a case of someone being on a rather overloaded server which IIRC was timing out when the blocks admin page was submitted (it needs quite a bit of processing).

noid’s picture

Thanks gpk for the tips! As far as I know, the block settings are being saved for the right theme. Also tried saving the actual blocks but it didn't work. Yup, I could try tweaking the database itself, but would prefer solving the root of the problem itself.

Have submitted a support ticket to my host re the time out possibility, and waiting for a reply.

P.S. Just want to rule out that this was caused by the upgrade, because I remember adding and enabling a new block to one of the sites after the upgrade. So in fact this is happening only now -- so it may well be a server issue after all.

gpk’s picture

When you change settings on the block admin page (i.e. you view the page then you change settings and hit Submit and see the page a 2nd time) you should actually see three hits on admin/build/block in your accesslog table:

- when you first view the page
- when you submit the page (and the POST form submission is handled, probably some seconds later)
- and then perhaps 1 or 2 seconds later (on my server at least) when the page is displayed again

You should see the same sequence in your Apache access log.

Worth also checking the watchdog and Apache error logs.

As well as processing timeout it possible to hit a POST form submission limit which some servers use.

noid’s picture

gpk, like you suggested I looked at the logs and didn't see the admin/block being accessed. Also, my site has been plagued by spam bots for a long time now, and this might be interfering with the processing of the block settings. Here's the latest from my Drupal logs for example -- I can't see the admin/block page being accessed. Do you think I'm onto something here? What do you suggest to block the spam?

warning page not found 2008-05-16 11:41 404.shtml not found. Anonymous
warning page not found 2008-05-16 11:39 404.shtml not found. Anonymous
warning page not found 2008-05-16 11:38 404.shtml not found. Anonymous
warning page not found 2008-05-16 11:36 404.shtml not found. Anonymous
warning page not found 2008-05-16 11:11 404.shtml not found. Anonymous
warning page not found 2008-05-16 11:01 404.shtml not found. Anonymous
warning page not found 2008-05-16 11:00 404.shtml not found. Anonymous
warning page not found 2008-05-16 10:58 404.shtml not found. Anonymous
warning page not found 2008-05-16 10:55 404.shtml not found. Anonymous
warning page not found 2008-05-16 10:41 404.shtml not found. Anonymous
warning page not found 2008-05-16 10:36 404.shtml not found. Anonymous
warning page not found 2008-05-16 10:34 404.shtml not found. Anonymous
warning page not found 2008-05-16 10:29 404.shtml not found. Anonymous
warning page not found 2008-05-16 10:22 404.shtml not found. Anonymous
warning page not found 2008-05-16 10:22 404.shtml not found. Anonymous
warning page not found 2008-05-16 10:18 404.shtml not found. Anonymous
warning page not found 2008-05-16 10:13 404.shtml not found. Anonymous
warning page not found 2008-05-16 10:02 404.shtml not found. Anonymous
warning page not found 2008-05-16 09:59 404.shtml not found. Anonymous
warning page not found 2008-05-16 09:59 404.shtml not found. Anonymous
warning page not found 2008-05-16 09:56 404.shtml not found. Anonymous
warning page not found 2008-05-16 09:47 404.shtml not found. Anonymous
warning page not found 2008-05-16 09:45 404.shtml not found. Anonymous

gpk’s picture

To counter spam bots: www.mollom.com

I think you are looking in the {watchdog} table for errors (which is always a sensible thing to do) but to check page views you need to enable the statistics module and then look at admin -> logs -> hits (or the {accesslog} table). Or check your Apache logs.

noid’s picture

Yup, I realized it was the watchdog log after posting -- sorry. :P

I saw your other post http://drupal.org/node/228871#comment-753046 , and am now asking my host if it's a case of a "PHP time limit" problem or any such timing problems. (Tried disabling the views module but same result.)

Also found out I can change the values in the database itself and it was reflected on the site. So my gut feel right now is that this is a server issue since all of my sites -- 4.7.x and 5.x -- are all affected. What do you think? Any more ideas? Thanks by the way for your patience, gpk. :)

conniec’s picture

I have the same problem w/ both D5.3-.7 and D6
http://drupal.org/node/252334

My host is 1and1.com Who do you use?

Connie

noid’s picture

Hi Connie,

My host Hotdrupal.com just solved the problem. :) The owner, Steve Brown, said he 'checked around the logs and noticed suhosin being tickled.' Am still waiting for his explanation, but the changes to my admin/block page are now being saved! :) HotDrupal is great -- you rock, Steve! :)

(gpk, thank you again for your replies.:))

Hope this helps you out, Connie. :)

gpk’s picture

It was probably one of these "features"

* Allows enforcing limits on REQUEST variables or separated by type (GET, POST, COOKIE)
o Supports a number of variables per request limit
o Supports a maximum length of variable names [with and without indicies]
o Supports a maximum length of array indicies
o Supports a maximum length of variable values
o Supports a maximum depth of arrays

(from http://www.hardened-php.net/suhosin/a_feature_list.html)

noid’s picture

gpk,

Am still not sure what happened -- was spam the culprit? :)

gpk’s picture

No, probably it was a suhosin setting which limits the amount of data that can be sent (POSTed) from a form to the server. Not very Drupal friendly given the size of various of the settings forms!

noid’s picture

Yup, you're right gpk. From Steve, the owner of my host:"Suhosin is an extension for PHP which watches for things it thinks is odd. I had to adjust the settings a little so it wouldn't think you are doing anything weird."

Thanks, gpk! :D

Anonymous’s picture

We had the same problem. Our block page contained over 200 variables, which caused the Suhosin Extension to block the POST DATA.

We fixed it by asking the hosting to change Suhosin settings.

suhosin.post.max_vars = 200, became 500.

PraetorianFX’s picture

this is fix my problem
its happen on admin settings permission to..
if we have a large POST variables and Multiple groups permission.

then my solution was, i have to set this PHP variables

max_execution_time 60 30 -> increase to 1500
max_input_time 60 60 -> increase to 1000
memory_limit 132M 132M -> increase to 256M
post_max_size 8M 8M -> increase to 96M
upload_max_filesize 2M 2M -> increase to 50M

suhosin.get.max_vars 100 100 -> increase to 200
suhosin.post.max_vars 200 200 -> increase to 500
suhosin.request.max_vars 200 200 -> increase to 500

hope its help

gpk’s picture

The settings which will have helped you are

suhosin.post.max_vars 200 200 -> increase to 500
suhosin.request.max_vars 200 200 -> increase to 500

Increasing the other settings (particularly the non-suhosin settings) to such high values might not be such a good idea for most people.

BigMike’s picture

Thank you for the suhosin settings tweak. This fixed it for me! **FINALLY** no more using phpMyAdmin to rearrange my blocks ><

CanOne’s picture

in my case it helped to turn suhosin off

its sometimes possible even on webspace packages just check your config panel like confixx