? ? Success

User tests: Successful: Unsuccessful:

avatar mahagr
mahagr
27 Apr 2015

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.

avatar mahagr mahagr - open - 27 Apr 2015
avatar brianteeman
brianteeman - comment - 27 Apr 2015

Shouldnt the message be "failed to update menu ITEMS" not menus

avatar mahagr mahagr - reference | - 27 Apr 15
avatar mahagr
mahagr - comment - 27 Apr 2015

Updated error messages based on suggestion made by @brianteeman .

avatar infograf768
infograf768 - comment - 28 Apr 2015

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"
avatar mahagr
mahagr - comment - 28 Apr 2015

@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:

  • alphabetical ignoring underscore
  • underscore comes after letters (PHP sort order)
  • underscore comes before letters
avatar infograf768
infograf768 - comment - 28 Apr 2015

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. :)

avatar infograf768
infograf768 - comment - 28 Apr 2015

Just leave it as is. No big deal. :+1:

avatar zero-24 zero-24 - change - 29 Apr 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 29 Apr 2015
Labels Removed: ?
avatar zero-24 zero-24 - change - 29 Apr 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 29 Apr 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 29 Apr 2015
Labels Removed: ?
avatar zero-24 zero-24 - change - 29 Apr 2015
Category Administration Language & Strings UI/UX
avatar zero-24 zero-24 - change - 29 Apr 2015
Status New Pending
Easy No Yes
avatar kat05
kat05 - comment - 29 Apr 2015

@test i tested the patch and it resolved the issue for me.

avatar OctavianC
OctavianC - comment - 5 May 2015

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.

avatar mahagr
mahagr - comment - 5 May 2015

Joomla menu library files do not escape names either, so I guess they will work..?

avatar zero-24 zero-24 - change - 5 May 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 5 May 2015
Labels Added: ?
avatar julienV
julienV - comment - 9 May 2015

@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


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6854.

avatar julienV julienV - test_item - 9 May 2015 - Tested successfully
avatar mahagr
mahagr - comment - 9 May 2015

@brianteeman should be good to go.

avatar brianteeman brianteeman - alter_testresult - 24 May 2015 - kat05: Tested successfully
avatar brianteeman
brianteeman - comment - 24 May 2015

Issue observed without PR
Applied PR and issue resolved


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6854.

avatar brianteeman brianteeman - test_item - 24 May 2015 - Tested successfully
avatar brianteeman brianteeman - change - 24 May 2015
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 24 May 2015

Setting RTC thanks


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6854.

avatar brianteeman brianteeman - change - 24 May 2015
Labels Added: ?
avatar wilsonge
wilsonge - comment - 29 May 2015

Merged - thankyou very much!

avatar wilsonge wilsonge - change - 29 May 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-05-29 09:05:32
Closed_By wilsonge
avatar wilsonge wilsonge - close - 29 May 2015
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment