Imported menu preset is not the same as the menu that was exported
Create a new admin menu with at least one heading and one child menu item
Export the menu as a preset
Delete the menu
Copy the downloaded xml file to administrator\components\com_menus\presets
Create a new admin menu and select the previously uploaded preset
Menu created exactly as defined at the beginning
All menu items are at the same level
This works in J3 where the xml produced is
<?xml version="1.0"?>
<menu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:joomla.org" xsi:schemaLocation="urn:joomla.org menu.xsd">
<menuitem type="heading" title="heading" link="#" class=" " access="1">
<params>{"menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_image_css":"","menu_text":1,"menu_show":1}</params>
<menuitem type="component" title="child" link="index.php?option=com_content&view=article&layout=edit&id=0" element="com_content" class=" " access="1">
<params>{"menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_image_css":"","menu_text":1,"menu_show":1}</params>
</menuitem>
</menuitem>
</menu>
Bit in J4 the xml is
<?xml version="1.0" encoding="UTF-8"?>
<menu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:joomla.org" xsi:schemaLocation="urn:joomla.org menu.xsd">
<menuitem type="heading" title="test admin" link="#" class=" " access="1">
<params>{"menu-anchor_title":"","menu_icon":"","menu_image":"","menu_image_css":"","menu_text":1,"menu_show":1,"dashboard":""}</params>
</menuitem>
<menuitem type="component" title="create article" link="index.php?option=com_content&view=article&layout=edit&id=0" element="com_content" class=" " access="1">
<params>{"menu-anchor_title":"","menu_icon":"","menu_image":"","menu_image_css":"","menu_text":1,"menu_show":1}</params>
</menuitem>
</menu>
The problem is that in J4 the detection of children is not working
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
Labels |
Added:
PBF
|
Labels |
Removed:
PBF
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-03-28 18:29:39 |
Closed_By | ⇒ | Hackwar |
I created a PR: #43178. Closing this issue.