User tests: Successful: Unsuccessful:
Right now when you uninstall component which has menu items pointing to the component and go to menu manager, you will see message:
Component 'com_extension' does not exist.
In site you will get similar error:
404 Component not found.
The issue is that when you install the component back, you will still get the same error message unless you manually save each of the components menu items.
This pull request attempts to fix the issue by automatically updating all the menu items pointing to the component.
PS. Some extensions like Kunena and Akeeba already fix their menu items manually to work around this issue. So when testing, make sure you get the above error messages even after installing your favourite extension.
Updated error messages based on suggestion made by @brianteeman .
Please alpha order the new string:
It should come just before JLIB_INSTALLER_ABORT_CREATE_DIRECTORY
JLIB_INSTALLER_ABORT_COMP_UPDATESITEMENUS_FAILED="Component Install: Failed to update menu items."
JLIB_INSTALLER_ABORT_CREATE_DIRECTORY="Extension %1$s: Failed to create directory: %2$s"
@infograf768 I ordered them based on lines 422-423 (admin file, few lines above my change):
JLIB_INSTALLER_ABORT_ALREADYINSTALLED="Extension is already installed."
JLIB_INSTALLER_ABORT_ALREADY_EXISTS="Extension %1$s: Extension %2$s already exists."
Where word with letter is ordered before underscore. Name is without space because of the original string just above my check does the same.
My question is what is the supposed order:
I always based my work on:
"Blank spaces between words in a page name are treated as an underscore "_", and are therefore ordered after upper case letters and before lower case letters. Blank spaces after a page name come before any character."
in
http://en.wikipedia.org/wiki/Help:Alphabetical_order
and we use here Upper Case letters.
I use "Sort" plugin in Eclipse, which has automatically ordered the strings this way.
Not a big deal though. :)
Just leave it as is. No big deal.
Labels |
Added:
?
|
Labels |
Removed:
?
|
Labels |
Added:
?
|
Labels |
Added:
?
|
Labels |
Removed:
?
|
Category | ⇒ | Administration Language & Strings UI/UX |
Status | New | ⇒ | Pending |
Easy | No | ⇒ | Yes |
I'd love to get this merged, but don't we need to properly quote column names and aliases? Eg.
->where($db->qn('m.client_id') . ' = ' . $db->q(0))
Or
->update($db->qn('#__menu', 'm'))
This would probably ensure it will work with other db drivers.
Joomla menu library files do not escape names either, so I guess they will work..?
Labels |
Added:
?
|
Labels |
Added:
?
|
@test i installed a component, created a menu item, then uninstalled, and reinstalled it.
without the patch, i got the Component 'com_extension' does not exist message in the menu items backend page.
Same process with the patch works as expected, the menu item works properly
@brianteeman should be good to go.
Issue observed without PR
Applied PR and issue resolved
Status | Pending | ⇒ | Ready to Commit |
Setting RTC thanks
Labels |
Added:
?
|
Merged - thankyou very much!
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-05-29 09:05:32 |
Closed_By | ⇒ | wilsonge |
Labels |
Removed:
?
|
Shouldnt the message be "failed to update menu ITEMS" not menus