Please, find below two patches implementing missing hook_uninstall to clear system variables.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers’s picture

Title: system variables are not uninstalled » hook_install() implementation to delete HS' variables are not implemented
Priority: Normal » Minor
Status: Active » Fixed

Thanks! Committed, after I made some changes to your patch (there were some minor mistakes).

http://drupal.org/cvs?commit=417828

Wim Leers’s picture

Title: hook_install() implementation to delete HS' variables are not implemented » hook_install() implementations to delete HS' variables are missing
voxpelli’s picture

Version: 6.x-3.3 » 6.x-3.4
Priority: Minor » Critical
Status: Fixed » Needs work

This patch breaks hierarchical_select.install - it adds a new hierarchical_select_uninstall() but there already exists one so PHP throws a fatal error when trying to redeclare it.

Wim Leers’s picture

Status: Needs work » Fixed

Fixed: http://drupal.org/cvs?commit=417878.

@dimi_did: epic fail of you for not testing your code at all. Epic fail of me for not reviewing it carefully enough.

HS 3.5 release will be out in a couple of minutes.

Wim Leers’s picture

Title: hook_install() implementations to delete HS' variables are missing » hook_uninstall() implementations to delete HS' variables are missing

And the title was *still* wrong. Another fail. Meh.

benoit.borrel’s picture

@Wim Leers #4: dimi_did patch was developed against 6.x-3.3 for which it works perfectly. I was ready to submit the fix for 6.x-3.4, but you seem to be about to release 6.x-3.5, so I'll pass my turn.
:-)

Wim Leers’s picture

@benoit.borrel: False. I applied it to 3.3 and that was part of 3.4. It's what broke 3.4, since hook_uninstall() was already implemented.

benoit.borrel’s picture

@Wim Leers: sorry but, according to:

there were no hook_uninstall() implemented yet in 6.x-3.3.

dimi_did and I had pair developed and tested the patches for 6.x-3.3 and we didn't get any PHP fatal error for function redefinition. Next time we will provide the tests too.
:-P

dimi_did’s picture

Absolutely. Wim, we are sorry about that but we tested it successfully with 6.x-3.3 release. Happy if it's working well now ;-) !

Wim Leers’s picture

In that case, completely my bad. My apologies!

amal850720’s picture

@wim leers: epic confusion. lol. thanks anyway wim.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.