Block status not being saved in database

noid - May 15, 2008 - 14:09

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!

I've very occasionally hit

gpk - May 15, 2008 - 14:21

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).

gpk
----
www.alexoria.co.uk

Thanks gpk for the tips! As

noid - May 15, 2008 - 14:49

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.

When you change settings on

gpk - May 15, 2008 - 15:45

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.

gpk
----
www.alexoria.co.uk

gpk, like you suggested I

noid - May 16, 2008 - 04:16

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

To counter spam bots:

gpk - May 16, 2008 - 08:32

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.

gpk
----
www.alexoria.co.uk

Yup, I realized it was the

noid - May 16, 2008 - 16:28

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. :)

I have the same problem w/

conniec - May 16, 2008 - 16:54

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

Problem solved - 'suhosin tickled!'

noid - May 16, 2008 - 17:41

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. :)

It was probably one of these

gpk - May 16, 2008 - 17:44

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)

gpk
----
www.alexoria.co.uk

gpk, Am still not sure what

noid - May 16, 2008 - 18:00

gpk,

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

No, probably it was a

gpk - May 16, 2008 - 18:53

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!

gpk
----
www.alexoria.co.uk

Yup, you're right gpk. From

noid - May 17, 2008 - 04:38

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

Same problem caused by Suhosin PHP Extension

mxistence - June 11, 2008 - 10:20

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.

 
 

Drupal is a registered trademark of Dries Buytaert.