When updating the machine name from a display, and the blocks module is not installed. You get a fatal error about the blocks update query.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nils.destoop’s picture

Status: Active » Needs review
FileSize
641 bytes

Attached is a patch

dawehner’s picture

FileSize
1.04 KB

Actually i think that the block display might not appear at all if there is no block module installed, though this might cause a lot of additional problems if we do that.

Lets go with this patch, thanks for writing one! Just added a comment + proper indentation.

dawehner’s picture

Status: Needs review » Fixed

Thanks for the patch! Committed it to 7.x-3.x and 8.x-3.x

andypost’s picture

You better use db_table_exists() because module could be installed but disabled

dawehner’s picture

Feel free to post a follow-up patch.

andypost’s picture

Status: Fixed » Needs review
FileSize
566 bytes

Suppose code comment is ok, just need to check block's table.
module_exists() returns TRUE only if module installed and enabled

dawehner’s picture

I'm not sure, but why would you want to update the block table if you don't have the block module installed ...
At least in most cases you expect that the table data is not changed anymore once you have disabled a module.

dawehner’s picture

Status: Needs review » Fixed

After some dicussions i realized you were right! Committed to both 7.x-3.x and 8.x-3.x

andypost’s picture

We need this because of block module could be installed but disabled

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.