?
avatar rdeutz
rdeutz
18 Jan 2017

Steps to reproduce the issue

  • Install latest Staging
  • Install a extension (I used http://www.sermonspeaker.net/download.html because it is free and can be updated)
  • Create a custom admin menu
  • Update the extension or re-install (should be the same)

Expected result

Custom menu item still exist

Actual result

Custom menu item gone

System information (as much as possible)

Doesn't matter

Additional comments

The problem seems to be in "libraries/cms/installer/adapter/component.php" and there in "_removeAdminMenus". This function removes admin menu items based on the extension id, it doesn't filter on a menutype because in the past all menu items with client_id == 1 are part of the admin menu.

Because the condition were so clean and simple in the past the easy way of delete all and re-create worked. With having more then one admin menu this has changed.

avatar rdeutz rdeutz - open - 18 Jan 2017
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jan 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Jan 2017
avatar rdeutz
rdeutz - comment - 18 Jan 2017

@izharaazmi Do you have an idea what we can do to fix this problem.

avatar izharaazmi
izharaazmi - comment - 19 Jan 2017

@rdeutz I am looking at that. Will get back once I'm sure.

avatar izharaazmi
izharaazmi - comment - 19 Jan 2017

I see two things that should be done. Please confirm if I am right at this.

  1. Change \JInstallerAdapterComponent::_removeAdminMenus to remove only the protected menu items, i.e. - menutype == 'main' and leave alone other menutypes.
  2. Replicate \JInstallerAdapterComponent::_updateSiteMenus to update the admin menus as well.
avatar infograf768
infograf768 - comment - 19 Jan 2017

@izharaazmi
I also remarked some other issues (legacy site):

  1. we do not have any more after updating any menutype as menu. Only main. This should be changed in both code and lang strings.
  2. The client field in menu items manager was not present. I had to delete the com_menus folder and re-add a fresh one from staging to get it back.
  3. Some actions are possible when displaying Administrator menu items but have no effect. Some have effect (trash and delete) for protected items which should not be.
avatar infograf768
infograf768 - comment - 19 Jan 2017

Other issues.
I do not understand this

screen shot 2017-01-19 at 10 37 16

Also, I remember when testing in the past that we had a Menu Item of type components. I do not find it anymore.

avatar izharaazmi
izharaazmi - comment - 19 Jan 2017

...remarked some other issues (legacy site):

  1. Ok
  2. Sorry, didn't get it.
  3. I was not sure whether it would have any effect therefore left it as is.

Other issues.

This is the menu item link for specific menu type for creating these menu items
image

Menu Item of type components...

What were they for? I don't remember that right.

avatar infograf768
infograf768 - comment - 19 Jan 2017

This is the menu item link for specific menu type for creating these menu items
OK, got it. It's a direct link to display the menu items belonging to a specific menu type or All menu items. I guess the DESC should be more precise.

The Menu item of type Components, if I remember well, was displaying exactly the same items as the default current admin menu Components, and it was customisable to include or not all the corresponding menu items (including newly installed extensions).

avatar infograf768
infograf768 - comment - 19 Jan 2017

Ok, found out.
It is very hard to find. Something has to be done for that.
One has first to choose a sub-title Menu Item an then in the second tab is displayed the Component Menu Container.

This is a very important feature. Maybe we need a new specific choice in the Select box.

avatar infograf768
infograf768 - comment - 19 Jan 2017

Another thing:
If one of the menu items which are compulsory is placed as a sub menu of a Heading menu item, it is considered missing and we get the Alert:
screen shot 2017-01-19 at 11 48 02

avatar izharaazmi
izharaazmi - comment - 19 Jan 2017

@infograf768 May be we should move it to first tab?

avatar infograf768
infograf768 - comment - 19 Jan 2017

@infograf768 May be we should move it to first tab?

Not enough imho. Ideal would be to display it in the pop-up select list by itself. It is the best way I see. As it is now it displays in System Links.
screen shot 2017-01-19 at 11 54 13

Another possible but not as good solution would be to change the string label and desc when client is admin. In this case, yes, displaying the field in the first tab would be better than now.

avatar infograf768
infograf768 - comment - 20 Jan 2017

One of my issues ( #13642 (comment) ) is solved by #13650 ?

avatar Bakual
Bakual - comment - 28 Jan 2017

I think this one is actually an important issue as it basically makes the whole feature useless.
To recap: After updating an extension, all custom menuitems are removed. Imagine an agency setting up a custom admin menu for the customer and then after the next round of updates - Badoom - half of the menu is gone. All items for the updated extensions are missing.

Imho, this should be a release blocker as it completely breaks the new feature. What do you think @rdeutz ?

avatar izharaazmi
izharaazmi - comment - 28 Jan 2017

I proposed a solution above and working on it too. Will send few PRs this
Monday hopefully.

avatar Bakual
Bakual - comment - 28 Jan 2017

Yep, saw that comment (#13642 (comment)) and it sounded good.
I just want to make sure it doesn't get forgotten.

avatar Bakual Bakual - change - 28 Jan 2017
Labels Added: ?
avatar Bakual Bakual - labeled - 28 Jan 2017
avatar Bakual
Bakual - comment - 28 Jan 2017

Added the labels so it sticks out. Robert can adjust it if he thinks it's wrong.

avatar rdeutz
rdeutz - comment - 29 Jan 2017

I agree this is important, we need to figure this out before next Tuesday (Release day for beta1). I think the developer of the current code took the easy path (nothing wrong whit it) delete and recreate will always work. But now I think we need to compare the current admin menu with the admin menu that would be created with the update.

avatar Bakual
Bakual - comment - 29 Jan 2017

For the protected mainmenu, the "Components" part could still be done the old way. It's just the custom menus which should not be touched. There the same mechanics like in frontend should apply. If the component doesn't exist anymore, the link can be disabled and when a view doesn't exist anymore it just gives a 404.

avatar Kubik-Rubik Kubik-Rubik - change - 2 Feb 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-02-02 18:48:56
Closed_By Kubik-Rubik
avatar Kubik-Rubik Kubik-Rubik - close - 2 Feb 2017
avatar rdeutz rdeutz - change - 2 Feb 2017
Labels Removed: ?
avatar rdeutz rdeutz - unlabeled - 2 Feb 2017

Add a Comment

Login with GitHub to post a comment