Uninstall module will delete all variables which names contains 's'. All variables of ALL existing modules & themes.

This statement db_query("DELETE FROM {variable} WHERE name LIKE '%%s%'", 'acidfree');
is equal to DELETE FROM {variable} WHERE name LIKE '%s%'

Need to be

  variable_del('acidfree_variable_name_1);
  variable_del('acidfree_variable_name_2);
  variable_del('acidfree_variable_name_3);

Sorry for my bad English.

Comments

kari.nies’s picture

Subscribing and hoping for a solution. I really want to uninstall this module.

sysname’s picture

file 'acidfree.install'

ORIGIN

function acidfree_uninstall() {
    db_query('DROP TABLE {acidfree_album}');
    db_query("DELETE FROM {variable} WHERE name LIKE '%%s%'", 'acidfree');
    taxonomy_del_vocabulary(variable_get('acidfree_vocab_id', 0));
    db_query("DELETE FROM {blocks} WHERE module = '%s'", 'acidfree');
}

Minimal changes:
-change order of 2nd and 3rd strings
-corrected SQL statement in NEW 3rd string.

function acidfree_uninstall() {
    db_query('DROP TABLE {acidfree_album}');
    taxonomy_del_vocabulary(variable_get('acidfree_vocab_id', 0));
    db_query("DELETE FROM {variable} WHERE name LIKE '%acidfree%'");
    db_query("DELETE FROM {blocks} WHERE module = '%s'", 'acidfree');
}
kari.nies’s picture

That seems to have done the trick. Thank you very much for the update!

mrsimonelliott’s picture

I have made a patch for this issue here #354557: Error received on Uninstall of AcidFree

mwheinz’s picture

Assigned: Unassigned » mwheinz
mwheinz’s picture

Status: Active » Closed (duplicate)

This is a duplicate of http://drupal.org/node/354557.

Thanks for the patch; why did you change the order of the 2nd and 3rd lines?

sysname’s picture

why did you change the order of the 2nd and 3rd lines?

Grouping DELETE statements together.

mwheinz’s picture

Thanks - I was worried there was some issue about the order the statements had to be done in.