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 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.
Comment | File | Size | Author |
---|---|---|---|
#14 | 0001-Issue-2040057-For-removing-block-configuration-varia.patch | 1.75 KB | mandar.harkare |
#11 | 2040057.patch | 900 bytes | RobLoach |
#4 | 0001-Related-to-issue-2040057.patch | 5.09 KB | mandar.harkare |
Comments
Comment #1
slashrsm CreditAttribution: slashrsm commentedAgree. Patch is welcome.
Comment #2
RobLoachComment #3
mandar.harkare CreditAttribution: mandar.harkare commentedComment #4
mandar.harkare CreditAttribution: mandar.harkare commentedHere I'm uploading a patch. Waiting for your comments and/or suggestions.
Comment #5
mandar.harkare CreditAttribution: mandar.harkare commentedPlease review the patch
Comment #6
mandar.harkare CreditAttribution: mandar.harkare commentedComment #7
RobLoachNot sure we need a new table for this. We could just break all the variables out into individual variable_del() calls.
Comment #8
mandar.harkare CreditAttribution: mandar.harkare commentedComment #9
mandar.harkare CreditAttribution: mandar.harkare commented@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.
Comment #10
slashrsm CreditAttribution: slashrsm commented@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.
Comment #11
RobLoachReally 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.
Comment #12
slashrsm CreditAttribution: slashrsm commentedThat looks fine, but we still need to add variables that are storing block configuration.
Comment #13
mandar.harkare CreditAttribution: mandar.harkare commentedI 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
Comment #14
mandar.harkare CreditAttribution: mandar.harkare commentedHave I added all the variables? Please review.
Thanks.
Comment #15
slashrsm CreditAttribution: slashrsm commentedCommitted. Thanks!
Comment #16
mandar.harkare CreditAttribution: mandar.harkare commentedThanks !
@Slash : For committing,
@Rob : For helping me with code.