No Code Attached Yet J3 Issue
avatar waveywhite
waveywhite
19 Oct 2020

Steps to reproduce the issue

  1. Create a menu tree with child menus
    e.g:
    menu1
    |-parent
    |-child
    menu2
    |-menuitem
    |-anotheritem

  2. Somehow (not sure how our site admins did this), remove the parent to orphan the child menu
    menu1
    |-child
    menu2
    |-menuitem
    |-anotheritem

  3. Go to com_modules and create a new module

  4. Attempt to assign the module to a specific menu item

Expected result

You can assign the module to a specific menu item

Actual result

The menu item tree goes haywire due to too many close tags being rendered in the HTML

System information (as much as possible)

Joomla 3.9.21
PHP 7.2.24-0ubuntu0.18.04.7

Additional comments

The error appears to be in administrator/components/com_modules/views/module/tmpl/edit_assignment.php . The code assumes that you can only go up one level at a time but can go down multiple levels. So, if the assumption is broken you end up with too many close tags.

avatar waveywhite waveywhite - open - 19 Oct 2020
avatar joomla-cms-bot joomla-cms-bot - change - 19 Oct 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Oct 2020
avatar brianteeman
brianteeman - comment - 20 Oct 2020

If you rebuild the menu does the problem resolve itself?

image

avatar waveywhite
waveywhite - comment - 20 Oct 2020

Hi Brian,

I just tried it on a duplicate of that site and it doesn't resolve the issue. The orphaned menu item remains in that state and the module menu assignment is still broken. What does resolve it is trashing the problem menu item. Presumably, re-parenting it would also work.

-David.

avatar chmst
chmst - comment - 22 Oct 2020

I thought, this was resolved years ago, so that a menuitem cold not be trashed if there were articles in any menu item in the tree.

avatar waveywhite
waveywhite - comment - 22 Oct 2020

Can a menuitem be moved to another menu without its children? It looks like this could have happened.

There seems to be two issues, the first is that somehow the website admins managed to orphan menu items, and the second is the assumption in com_modules that orphaned menu items can't exist.

avatar jwaisner jwaisner - change - 2 Nov 2020
Labels Added: J3 Issue
avatar jwaisner jwaisner - labeled - 2 Nov 2020
avatar brianteeman
brianteeman - comment - 26 Aug 2022

Thank you for raising this issue.

Joomla 3 is now in security only mode with no further bug fixes or new features.

As this issue doesn't relate to Joomla 4 it will now been closed.

If we are mistaken and this does apply to Joomla 4 please open a new issue (and reference this one if you wish) with updated details for testing in Joomla 4.
cc @zero-24

avatar alikon alikon - close - 26 Aug 2022
avatar alikon alikon - change - 26 Aug 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-08-26 19:13:42
Closed_By alikon
Labels Added: No Code Attached Yet
Removed: ?

Add a Comment

Login with GitHub to post a comment