Drupal, Bad Block PHP & Broken Site!
- Kevin's blog
- 993 reads
Tue, 23/06/2009 - 11:39
#2
To my shame I have found it
To my shame I have found it the hard way more than once, always when I'm in a hurry and makin a 'little change' ;-)
Fri, 11/09/2009 - 15:29
#3
I found another way...
Today I saved a PHP error into a block and broke my site. Luckily I had an administrative theme set up which did not contain the offending block. I could use my history to view admin pages, but couldn't load any pages which used my default theme, including the Blocks admin page.
This was the only page I found while looking for a solution. Rather than going into the database (which I don't have access to, and was a bit nervous about messing with) this is what I did:
- I opened my theme's .info file and removed the region which the offending block was in.
- I cleared the cache, and the rest of the site came back!
- I was then able view the Blocks admin page, and remove the offending block.
- Finally, I added the region back to my .info file, reposted it, cleared the cache, and am back in business!
Fri, 11/09/2009 - 17:37
#4
i'd say you were in a bit of
i'd say you were in a bit of a panic finding that solution!!!
Sat, 12/09/2009 - 06:29
#5
(No subject)

Sat, 12/09/2009 - 14:04
#6
ha ha
easier said then done! ... thanks for sharing the tip though, might come in very useful one day!
Sun, 18/04/2010 - 03:17
#7
thanks!
thanks man!
Sun, 30/05/2010 - 12:07
#8
Thanks for sharing this post.
Thanks for sharing this post. This is a very helpful and informative material. Good post and keep it up.
_____________________________________________________________
Daniel Perl
Tue, 19/10/2010 - 02:18
#9
Thanks for sharing this, but
Hi,
Thanks for idea, but I had same problem with Drupal5 and if you follow that procedure - you will probably get an error message: "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", that`s because D5 has no keys for this table;
you can sort it out something like this;
"UPDATE `blocks` set `region`='', `status`=0 where `region`='left' and `delta`=1 limit 2;"- add limit at the end too always, - inspired by MySQL Docs.
http://dev.mysql.com/doc/refman/5.0/en/update.html













Sounds like you might have found that out the hard way KEV???
-----------------------------------------------
Award Winning Web Design Cork : Pride Web Design Cork
-----------------------------------------------