The hook_uninstall() implementation removes all variables that have the `disqus_` prefix regardless of if the Disqus module created them or not. This causes other Disqus modules to lose their configuration if you uninstall the Disqus module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

slashrsm’s picture

Version: 7.x-1.9 » 7.x-1.x-dev
Category: bug » task

Agree. Patch is welcome.

RobLoach’s picture

Priority: Normal » Major
mandar.harkare’s picture

Assigned: Unassigned » mandar.harkare
mandar.harkare’s picture

Here I'm uploading a patch. Waiting for your comments and/or suggestions.

mandar.harkare’s picture

Status: Active » Needs review

Please review the patch

mandar.harkare’s picture

Assigned: mandar.harkare » Unassigned
RobLoach’s picture

Not sure we need a new table for this. We could just break all the variables out into individual variable_del() calls.

mandar.harkare’s picture

Assigned: Unassigned » mandar.harkare
mandar.harkare’s picture

@Rob : Sorry, I'm new to Drupal. I know having one more table is not a good idea, but in that case how will you get the variables specific to this module, is there any way to get variables specific to a module. Or passing just variable names manually to variable_del() will also be fine. i.e. variable_del('disqus_developer').

Thanks.

slashrsm’s picture

Status: Needs review » Needs work

@mandar.harkare: that should be fine assuming that you cover all possible variables. Later we'll keep track of any new variables that might appear.

RobLoach’s picture

Status: Needs work » Needs review
FileSize
900 bytes

Really glad you're willing to help out, mander! Maybe if we did something like this? What do you think? Just remove the variables manually rather than dynamically.

slashrsm’s picture

Status: Needs review » Needs work

That looks fine, but we still need to add variables that are storing block configuration.

mandar.harkare’s picture

I thought removing variables dynamically would be preferable but I think you are right, if we know which variables we are adding then having them removed manually will just be fine.

Thanks

mandar.harkare’s picture

Assigned: mandar.harkare » Unassigned
Status: Needs work » Needs review
FileSize
1.75 KB

Have I added all the variables? Please review.

Thanks.

slashrsm’s picture

Status: Needs review » Fixed

Committed. Thanks!

mandar.harkare’s picture

Thanks !
@Slash : For committing,
@Rob : For helping me with code.

Status: Fixed » Closed (fixed)

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

  • Commit e4a8e27 on 7.x-1.x, 8.x-1.x by slashrsm:
    Issue #2040057 by mandar.harkare, RobLoach | steven.wichers:...