User tests: Successful: Unsuccessful:
Fixes the Components Dashboard to work equivalently to the backend Main Menu with regards to uninstalled / disabled components.
#__extensions
record of the component to simulate a botched component uninstallation which leaves the component menu items behindThe main menu (sidebar) does not display links to the component.
However, the Components Dashboard (four squares icon next to the “Components” menu item name in the main menu) displays the missing component's links, untranslated. Clicking on them results in a 404 Component Not Found error page as expected.
The main menu (sidebar) does not display links to the component.
The Components Dashboard (four squares icon next to the “Components” menu item name in the main menu) does not display links to the component.
None.
This problem was observed on a live site a while after after we uninstalled a (paid) extension. Due to an internal error in the extension's script the uninstallation didn't complete. Unbeknownst to us at the time, the extension record was removed from the #__extensions
table, the files were removed from the filesystem BUT the #__menu
records were left behind.
We didn't think much of this uninstallation issue until a few weeks later when we started doing the final, detailed inspection of the site to get it ready for delivery. @crystalenka noticed that the Components Dashboard would display links to the extension whereas the sidebar Main Menu wouldn't. I took a 5' look and found the discrepancy between how mod_submenu and mod_menu post-process the loaded menu items. This PR addresses this discrepancy.
No, the offending component was NOT mine, NEITHER was it JCE or WebLinks. In any case the problem is not extension-specific, it can happen if the uninstallation is interrupted before the
#__menu
entries are removed for any reason.
Ideally, the common post-processing logic should be moved outside of Joomla\Module\Submenu\Administrator\Menu\Menu
and Joomla\Module\Menu\Administrator\Menu\CssMenu
and into Joomla\Component\Menus\Administrator\Helper\MenusHelper
so it can be reused by third party menu modules.
Please note that this is supposed to be my week off. I may not be very responsive until January 3rd when I'm back at the office. I don't even know how I got suckered into fixing this in my week off. Something something something can't say no to my wife and Joomla being Hotel California... Anyway, Merry Christmas / Happy Holidays and Happy New Year, y'all!
Status | New | ⇒ | Pending |
Category | ⇒ | Modules Administration |
Labels |
Added:
?
|
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-12-29 00:45:14 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Thanks!
I have tested this item✅ successfully on 27bbd5b
Tested successfully in 4.06-dev using PHP 8.0.13
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36441.