Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Creating a new admin menu leads of php notices #29810

Closed
PhilETaylor opened this issue Jun 28, 2020 · 11 comments
Closed

[4.0] Creating a new admin menu leads of php notices #29810

PhilETaylor opened this issue Jun 28, 2020 · 11 comments

Comments

@PhilETaylor
Copy link
Contributor

PhilETaylor commented Jun 28, 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

@infograf768
Copy link
Member

(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.

@PhilETaylor

This comment was marked as abuse.

@infograf768
Copy link
Member

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

@PhilETaylor

This comment was marked as abuse.

@infograf768
Copy link
Member

infograf768 commented Jun 29, 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.

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@infograf768
Copy link
Member

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.

@infograf768
Copy link
Member

btw, I confirm

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

@brianteeman
Copy link
Contributor

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

@PhilETaylor

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants