User login

Where does Drupal keep block information in the database?

Questions you'd want answered desperately fast if you did something remarkably stupid such as putting invalid PHP code in a block that breaks your entire site, even if you were lucky – I mean foresightful – enough to limit that darned block to a single node.

where is custom block text stored in drupal database
where is block data stored in drupal database

based on this API
http://api.drupal.org/api/5/function/block_example_contents

appears to be in the variable table

But that's not the case at all.

It is in fact looking at this API-
http://api.drupal.org/api/5/function/block_box_delete_submit

what I'm trying to say is that block text is stored in the bleeding "boxes" table in drupal databases.

I bet if I'd used Drupal 3 or something, the term boxes for blocks would make sense to me.

Questions you'd want answered desperately fast if you did something remarkably stupid such as putting invalid PHP code in a block that breaks your entire site, even if you were lucky – I mean foresightful – enough to limit that darned block to a single node.

where is custom block text stored in drupal database
where is block data stored in drupal database

based on this API
http://api.drupal.org/api/5/function/block_example_contents

appears to be in the variable table

But that's not the case at all.

It is in fact looking at this API-
http://api.drupal.org/api/5/function/block_box_delete_submit

what I'm trying to say is that block text is stored in the bleeding "boxes" table in drupal databases.

I bet if I'd used Drupal 3 or something, the term boxes for blocks would make sense to me.

Comments

Thanks

Thanks

Very Helpful!

I was just about to try some thing drastic, and thought I'd better find out how to un-do it if I screwed up.

Now I know! Who would have thought of looking in "boxes" (although I'm sure I would have if desperate enough).

I actually did screw up my site, but clicking the back button returned me to the edit block page and I was able to fix it.

By the way, what captcha do you use? Mine doesn't work!

Thanks!

Thanks a lot for this! I went searching in all of the obvious tables for block data, and boxes did not even cross my mind... I have been working with Drupal for over 6 months and I have never used that term used before.

No problem! And just to keep you on your toes

Drupal 7 kills the boxes table, effectively renaming it block_custom.

Thanks for saving...

my life!
"Boxes"!!! I'd never check this one!!!

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.