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.
The current hook_uninstall function is currently:
function panelizer_uninstall() {
db_delete('variable')
->condition('name', 'panelizer_defaults_%')
->execute();
db_delete('variable')
->condition('name', 'panelizer_node:%')
->execute();
}
Resulting in the query: DELETE FROM {variable} WHERE name = 'panelizer_defaults_%'
The conditions need to have the 'LIKE' added as a third argument.
function panelizer_uninstall() {
db_delete('variable')
->condition('name', 'panelizer_defaults_%', 'LIKE')
->execute();
db_delete('variable')
->condition('name', 'panelizer_node:%', 'LIKE')
->execute();
}
Resulting in the query: DELETE FROM {variable} WHERE name LIKE 'panelizer_defaults_%'
Comment | File | Size | Author |
---|---|---|---|
#3 | panelizer_fix_hook_uninstall-2198363-1.patch | 516 bytes | jamestombs |
#1 | panelizer_fix_hook_uninstall-2198363-1.patch | 530 bytes | jamestombs |
Comments
Comment #1
jamestombs CreditAttribution: jamestombs commentedPatch attached.
Comment #3
jamestombs CreditAttribution: jamestombs commentedTry again...
Comment #4
DamienMcKennaThis is a worthwhile stepping stone towards #2190839: hook_uninstall should properly uninstall all variables. I'll review it later, thanks.
Comment #5
DamienMcKennaCommitted. Thanks.