Currently, deleting an instance does not also delete it from the blocks table. This leaves orphan records in the blocks table. It would be ideal if the behavior is changed to work like custom blocks (which deletes all instance-associated records in both the blocks_custom table and the blocks table). I believe only the following needs to be added to the multiblock_delete function in multiblock.module:

  db_delete('block')
    ->condition('module', 'multiblock')
    ->condition('delta', (int) $multiblock_delta)
    ->execute();
  db_delete('block_role')
    ->condition('module', 'multiblock')
    ->condition('delta', (int) $multiblock_delta)
    ->execute();

I will try roll patch.

CommentFileSizeAuthor
#2 deleteblocks-1025886-2.patch675 bytesamanaplan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

phferraz’s picture

Hi there,

Is this works without problem?
Give us a feedback about that. Thank you.

amanaplan’s picture

Category: feature » bug
Status: Active » Needs review
FileSize
675 bytes

Roll of a patch to correct issue.

amanaplan’s picture

Status: Needs review » Reviewed & tested by the community

Have tested in many different instances and works. Marking RTBC.

amanaplan’s picture

Have tested in many different instances and works. Marking RTBC.

andrewlevine’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Sorry for the long wait. Just committed to 7.x-1.x-dev. Thanks for your help.