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.

Files: 
CommentFileSizeAuthor
#6 1621236-views-disabled-block.patch566 bytesandypost
PASSED: [[SimpleTest]]: [MySQL] 1,464 pass(es).
[ View ]
#2 1621236.patch1.04 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 1,451 pass(es).
[ View ]
#1 blocks_fatal_error-1621236-1.patch641 byteszuuperman
PASSED: [[SimpleTest]]: [MySQL] 1,451 pass(es).
[ View ]

Comments

zuuperman’s picture

Status:Active» Needs review
StatusFileSize
new641 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,451 pass(es).
[ View ]

Attached is a patch

dawehner’s picture

StatusFileSize
new1.04 KB
PASSED: [[SimpleTest]]: [MySQL] 1,451 pass(es).
[ View ]

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
StatusFileSize
new566 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,464 pass(es).
[ View ]

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.