No Code Attached Yet
avatar PhilETaylor
PhilETaylor
28 Jun 2020

Steps to reproduce the issue

Login to Joomla 4 admin as super admin

Menus -> Manage -> Select Administrator from dropdown

Click New - Set title = asfjkdhcksjdfyb - set unique name asfjkdhcksjdfyb -> click save and close

Click "Add a module for this menu" button

Give module a title - select position = menu [menu] click save and close

(The first time there was a link about "menu recovery mode" that I clicked, the second time this never showed)

Screenshot 2021-05-05 at 19 47 46

Expected result

No PHP Notices

Only ONE of the default menus

Actual result

Notice: Undefined property: Joomla\CMS\Menu\AdministratorMenuItem::$element in /var/www/html/administrator/modules/mod_menu/src/Menu/CssMenu.php on line 313

Screenshot 2020-06-28 at 19 13 33

And if I scroll down I see another default set of the menu system with "menu recovery" hide/show link

Screenshot 2020-06-28 at 19 15 44

System information (as much as possible)

Joomla 4 beta 1

avatar PhilETaylor PhilETaylor - open - 28 Jun 2020
avatar joomla-cms-bot joomla-cms-bot - change - 28 Jun 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Jun 2020
avatar infograf768
infograf768 - comment - 29 Jun 2020

(4.0-dev)
Looks like you forgot to say if you have or not chosen a preset when creating the menu or the module and which preset.

avatar PhilETaylor
PhilETaylor - comment - 29 Jun 2020

I don't believe I did select a preset. No.

avatar infograf768
infograf768 - comment - 29 Jun 2020

If I do not select a preset, I do not get your errors.

avatar PhilETaylor
PhilETaylor - comment - 29 Jun 2020

Strange. I'll try again today. Thanks for testing.

avatar infograf768
infograf768 - comment - 29 Jun 2020

There are other problems concerning admin menu creation: if one uses a preset (joomla or alternate) when creating the menu (and then that menu in the module instead of a preset), then if you need to delete some menu items through the menu items interface it takes ages to TRASH the menu items in that menu as we get into a loop (also problems with actionlogs...)
Then Empty trash is real broken. Only way is to delete the menu.

Remark that editing the menu itself does not display anymore the preset used. It is confusing.

avatar PhilETaylor
PhilETaylor - comment - 29 Jun 2020

ok I have it replicated now. The Notices dont show when on the Home Dashboard, but if you navigate to Menus ->All menu items then the notes show.

I also had this which I clicked to enable recovery mode

Screenshot 2020-06-29 at 09 43 30

avatar PhilETaylor
PhilETaylor - comment - 29 Jun 2020

I replicated as:

Menus -> Manager -> Select Administrator -> Click New =>
Title = MyBrokenMenu
Unique Name = MyBrokenMenu
Import a preset = none
Click Save and close
Click "Add a module for this menu"
Select MyBrokenMenu under Administrator in the left menu
Title = MyBrokenMenuModule
Menu to show = MyBrokenMenu
CheckMenu = yes
Position = Menu [menu]
Click save & close
Enable Menu Recovery Mode

avatar infograf768
infograf768 - comment - 30 Jun 2020

Sorry, confused about this

Select MyBrokenMenu under Administrator in the left menu

as it comes after

Click "Add a module for this menu"

as we are in a modal

But if I ignore this I do indeed get all these Notices from the module in the menu position because the Menu has no menu items (no presets were chosen when creating the Menu and same when creating the module) and CheckMenu was set to Yes.

I guess the solution would be to throw an error somewhere. We just have to find where.

avatar infograf768
infograf768 - comment - 30 Jun 2020

btw, I confirm

(The first time there was a link about "menu recovery mode" that I clicked, the second time this never showed)

avatar brianteeman
brianteeman - comment - 14 Mar 2021

This bug is caused by #23452 which probably should not have been merged due to lack of tests

avatar PhilETaylor PhilETaylor - change - 5 May 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 5 May 2021
avatar PhilETaylor
PhilETaylor - comment - 5 May 2021

This is still a bug today. Ran into it again.

avatar PhilETaylor PhilETaylor - close - 7 Mar 2022
avatar PhilETaylor PhilETaylor - change - 7 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-07 18:39:32
Closed_By PhilETaylor
Labels Added: No Code Attached Yet
Removed: ?

Add a Comment

Login with GitHub to post a comment