Within a block I have configured under the "Visibility settings" and "Show block on specific pages" I have put in PHP code that determines where this block is displayed within a page or not via a returned true or false. I have it working correctly but then I added additional restrictions within the PHP but I must have put in a syntax error that caused the site to go down saying "Temporarily Unavailable".

I need to be able to change the PHP code back to the working version but I don't know what drupal table the block PHP code is stored. Please tell me what drupal table the block php visibilities settings is stored at.

  • What version of Drupal is this? Commented Aug 21, 2013 at 16:03
  • Drupal 7 is the version Commented Aug 21, 2013 at 16:11

1 Answer 1


The php code should be stored in the pages field of the block table, and it should not be serialized.

The visibility field can have one of three values:


In the case of the first two, the pages field will contain a text list of the notlisted or listed pages for the block. in the case of the third, the field will contain the php code.

  • And what is the name of the table exactly in Drupal 8? block_content_field_data? Commented Sep 23, 2016 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.