No Code Attached Yet
avatar Bakual
Bakual
13 Sep 2021

Steps to reproduce the issue

Create a new administrator menuitem of the type "System Links" -> "Components Menu Container".
In the menuitem edit form, click the "Help" button

Expected result

A help screen reflecting the menuitem

Actual result

image

Additional comments

The reason for this error is that there is a help key defined in

<help key="JHELP_MENUS_MENU_ITEM_MENU_ITEM_CONTAINER"/>

but there is no corresponding language key which would then give a correct ref-key for the help server.
Actually there was no help page for it at all.
@coolwebcreations was kind enough to create the help page, but it is missing a redirect entry on the help server.

Once that is done, the language string can be replaced by the correct ref-key similar to #35429 and it should work.

avatar Bakual Bakual - open - 13 Sep 2021
avatar joomla-cms-bot joomla-cms-bot - change - 13 Sep 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Sep 2021
avatar Bakual
Bakual - comment - 21 Oct 2021

@ceford May you be able to help here? You wrote in the other PR that you created such pages last summer.
The help page was created, but it's missing a ref-key and such it can't be linked from core.

avatar ceford
ceford - comment - 21 Oct 2021

I created a Help page for Joomla 4 that you can see here:

https://docs.joomla.org/Help4.x:Menu_Item:_Components_Menu_Container

The way it gets called has changed since last summer - but I think the key that goes into the code is:

Menu_Item:_Components_Menu_Container

That goes into administrator/components/com_menus/forms/itemadmin_container.xml on line 79.

I will work on the Help screen more tomorrow.

avatar ceford
ceford - comment - 22 Oct 2021

I am a bit baffled by how the Component Menu Container is supposed to be used. It is an Admin item only - right? It seems that it is not possible to add or remove an item from the default Admin menu - third party items are specified in the installation xml file. So I created a new Admin menu 'My Menu' and in that I created a Component Menu Container named 'My Components'. That lets me Hide or Show any items already in the system Components menu. For the sake of argument I hid everything except Patch Tester. And along the way I turned off Menu Item check in the linked Module.

That all gives me an extra menu item 'My Components' with one sub-item 'Patch Tester' which I have anyway in the Components sub-items. I must be missing something!

avatar brianteeman
brianteeman - comment - 22 Oct 2021

Scenario

  1. You create a completely customised admin menu
  2. 1 month later you install a new component

Joomla needs to know which menu to add this new component to.

  1. You have a component menu container with existing components in it. Joomla adds new component
  2. You have an empty component menu container. As it is empty it is not displayed on your site but is displayed when joomla adds the new component to it
  3. You dont have a component menu container - joomla doesnt know what to do with your component

BUT the area of "confusion" is that the scenario above is with a 100% custom admin menu but in your example you have just "added" a menu to the existing joomla menu system.

If you are just adding to the default menu then

  1. you do not need to create a component menu container as you already have one in the default menu.
  2. you do not need to enable the menu item check
avatar ceford
ceford - comment - 22 Oct 2021

I have a custom menu (My Menu) containig a Components Menu Container (My Components). I just installed another component from a zip file - its menu/submenus are defined in its xml manifest file. The new component menu items appear in both the standard Components menu and in my custom My Components menu. I was not asked which menu to place it in. So I am still baffled!

avatar brianteeman
brianteeman - comment - 22 Oct 2021

BUT the area of "confusion" is that the scenario above is with a 100% custom admin menu but in your example you have just "added" a menu to the existing joomla menu system.

If you are just adding to the default menu then

  1. you do not need to create a component menu container as you already have one in the default menu.
  2. you do not need to enable the menu item check

You have TWO menus

  1. Core default menu
  2. Your own additional menu

In that scenario you do NOT need to add a component menu container in your additional menu as you already have one in the core default menu

avatar ceford
ceford - comment - 22 Oct 2021

Could Brian, or anyone, provide an example of how to use a Components Menu Container. At the moment the Help screen says Used to show a component container, which is no Help at all. I tried putting my menu module in a different position - custom top for example - but that needs styling. I would like the Help to say something like This menu item type is used to ...

avatar brianteeman
brianteeman - comment - 22 Oct 2021

This menu type is used as a parent container for any component. You need to have one of these otherwise joomla does not know where to put a newly installed component. If there are no menu items in this container then it will not be displayed in your menu.

avatar brianteeman
brianteeman - comment - 22 Oct 2021

Please test #35875 for the fix to the missing help on the button

avatar richard67
richard67 - comment - 22 Oct 2021

@brianteeman Does your PR solve this issue completely so we can close here, or is there something remaining?

avatar brianteeman
brianteeman - comment - 22 Oct 2021

It resolves the reported issue

avatar richard67 richard67 - change - 22 Oct 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-10-22 18:21:00
Closed_By richard67
avatar richard67 richard67 - close - 22 Oct 2021
avatar richard67
richard67 - comment - 22 Oct 2021

Closing as having a pull request. Please test #35875 . Thanks in advance.

avatar ceford
ceford - comment - 23 Oct 2021

Beginning to see the light. The Help page Introduction now reads as follows (comments welcome):

A use case for a Components Menu Container might be as follows:

Suppose you only wish to show Special users links to a subset of the Components on your site. Super Users will see links to everything of course. You can do this as follows:

  • Set access to Admin Menu in Administrator Modules to Super Users.
  • Create a new menu named, say, Special Menu with no imported presets.
  • Create a linked Module named, say, Special Menu with Access granted to Special. Set Check Menu to No.
  • Create a Components Menu Container menu item for the Special Menu named, say, Special Components.
    ** Hide any components that you do not wish the Special users to see.
    ** Show those to which they should have access.

For a Super User the Administrator menu will have an obvious duplication of links. However, a Special user will only see the Special Components menu and the Home Dashboard. You will need to adjust the Access permissions of the Quick Icon modules there too! And you really need to create a Dashboard module for any components Special users have access to.

For users who need access to Articles you can add more menu items to the Special Menu. In this way you can build a complete custom menu for Special users.

Add a Comment

Login with GitHub to post a comment