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.
Uninstalling the module leaves behind dirty config in any filter format that codesnippet was enabled for. This means that coming back and enabling the module later will restore all previous config.
Expected behavior when uninstalling should be to clean up data from editor configuration.
When uninstalling the module:
- CodeSnippet plugin settings should be removed from editor settings
- CodeSnippet toolbar button should be removed from editor settings
Comment | File | Size | Author |
---|---|---|---|
#6 | 2800239-2.patch | 1.88 KB | kevinquillen |
Comments
Comment #2
kevinquillen CreditAttribution: kevinquillen at Velir commentedAttaching patch.
Uninstalling the module has the intended result, codesnippet settings are removed and so is the toolbar button.
Is there a better way at reaching in and removing the button from the settings?
Comment #3
kevinquillen CreditAttribution: kevinquillen at Velir commentedComment #4
kevinquillen CreditAttribution: kevinquillen at Velir commentedComment #5
kevinquillen CreditAttribution: kevinquillen at Velir commentedComment #6
kevinquillen CreditAttribution: kevinquillen at Velir commentedAttaching updated patch.
I changed it so hook_uninstall calls a function to clean up the plugin from editor configurations instead. There may be other cases for 'flushing' plugin configuration from filter configuraiton without needing to uninstalling the module. I have ran into a few instances when developing the module where the config in the filter format gets dirty from an error, and then there is no way to 'clean' it without starting over.
It would be great if you could reset a core format back to its initial state at the click of a button. At the very least maybe an admin page that lets you select the filter, and then the plugin, to clear from it. The code is still similar.
Comment #7
James Nesbitt CreditAttribution: James Nesbitt at Wunder commentedComment #8
borisson_Can be strict compare.
This is however not required, and I think it would be helpful to have this in, setting to rtbc based on the code in the patch.