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 uninstall system currently uninstall the module, then pulls and removes the menu items. This works fine in situations where the menu system is static, however, in situations where the menu system is dictated via a database query (such as in views), invoking the database uninstall before pulling the menu causes errors to be thrown and menu items to not be correctly cleared from the system. By simply reversing the logic (first, pull the menu, then uninstall the module), things behave correctly and all menu items are correctly deleted.
Comment | File | Size | Author |
---|---|---|---|
#4 | uninstall-logic-reversal_0.patch | 973 bytes | Senpai |
uninstall-logic-reversal.patch | 813 bytes | csevb10 | |
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedpatch code looks good, applies cleanly
Comment #2
pwolanin CreditAttribution: pwolanin commentedtested with poll module, and uninstall works fine with this change (no logical reason why it wouldn't).
Comment #3
chx CreditAttribution: chx commentedYes this is a fine change.
Comment #4
Senpai CreditAttribution: Senpai commentedTested against HEAD using Devel and Devel Generate. All install/uninstall features still work as intended. I added a couple of one-liner comments to help out anyone staring at this function in the future. Send this baby on down the road!
Comment #5
Gábor HojtsyCommitted to 6.x. RTBC for 7.x. Thanks Senpai for your code comments!
Comment #6
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #8
spiffyd CreditAttribution: spiffyd commentedMy STATIC menu items also experience this problem... they don't get cleared after uninstall. Any suggestions on what I can do?! I am using 6.4.