Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | deleteblocks-1025886-2.patch | 675 bytes | amanaplan |
Comments
Comment #1
phferraz CreditAttribution: phferraz commentedHi there,
Is this works without problem?
Give us a feedback about that. Thank you.
Comment #2
amanaplan CreditAttribution: amanaplan commentedRoll of a patch to correct issue.
Comment #3
amanaplan CreditAttribution: amanaplan commentedHave tested in many different instances and works. Marking RTBC.
Comment #4
amanaplan CreditAttribution: amanaplan commentedHave tested in many different instances and works. Marking RTBC.
Comment #5
andrewlevine CreditAttribution: andrewlevine commentedSorry for the long wait. Just committed to 7.x-1.x-dev. Thanks for your help.