I was testing the nodejs suite of modules and after fully uninstalling all the modules I still have variables left over in the variables table.

They should be removed during hook_uninstall

nodejs_config_backend_host
nodejs_config_backend_messagePath
nodejs_config_backend_port
nodejs_config_cert
nodejs_config_debug
nodejs_config_extensions
nodejs_config_host
nodejs_config_js
nodejs_config_js_suggestion
nodejs_config_key
nodejs_config_port
nodejs_config_publishUrl
nodejs_config_resource
nodejs_config_write_channels
nodejs_config_write_clients
nodejs_pages
nodejs_service_key

There may be more as I didn't try all the modules, but that's what I had left.

Comments

julien66’s picture

Assigned: Unassigned » julien66

This is very right.
Each module should call its own hook_uninstall and use a variable_del().
I Will try to have a look at it and submit a patch.
Cheers.
++

julien66’s picture

Status: Active » Needs review
StatusFileSize
new1.39 KB

I had a deeper look into this.
It looks like you used the config module where most of thoses variables (except 'nodejs_pages') are coming from.

Digging into the code, I found several more. I'm not even sure they are all actually used.
I just added the list to the hook_uninstall as shown in attached patch.
++

julien66’s picture

Status: Needs review » Needs work

I'm doing a cleaner work on this right now.
Spreading what's need to be uninstalled from nodejs main module and from nodejs_config.

The fix is somehow related with the following issue : https://drupal.org/node/1917540 because the 'nodejs_service_key' variable should be set and uninstalled from the main module and not from the config module. The patch I'll publish there will cover this issue as well.
++

julien66’s picture

Status: Needs work » Needs review

I published a patch solving this issue and more here : https://drupal.org/node/1917540
Setting this issue to need review again.
++

  • Commit f54d1c5 on 7.x-1.x by beejeebus:
    #2181111 by julien66: clean up variables when the module is uninstalled.
    
Anonymous’s picture

Status: Needs review » Fixed

thanks, looks good.

Status: Fixed » Closed (fixed)

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