?
avatar AnrietteC
AnrietteC
5 Aug 2016

Steps to reproduce the issue

In Menu Manager, edit a menu's items. Click the Up/Down arrows to allow for ordering of menu items. Drag an item to below another item (of the same level, but with multiple sub-items).

Expected result

Simple order of other items should be kept that they were initially were in.

Actual result

Menu item ordering is jumbled and items are randomly outputting on the front-end and sometimes needs a menu rebuild to correct.

System information (as much as possible)

Joomla! 3.6.2 Stable [ Noether ] 4-August-2016 23:41 GMT
PHP 5.6.24-1~dotdeb+7.1
Joomla Platform 13.1.0
MySQL 5.5.49-0+deb7u1

Additional comments

avatar AnrietteC AnrietteC - open - 5 Aug 2016
avatar AnrietteC AnrietteC - change - 5 Aug 2016
The description was changed
avatar AnrietteC AnrietteC - edited - 5 Aug 2016
avatar ggppdk
ggppdk - comment - 5 Aug 2016

This is probably not new
How many menu items do you have ?

avatar AnrietteC
AnrietteC - comment - 5 Aug 2016

97 in this particular menu of which 3 are trashed.

Number of items at each level:
Level 1: 15
Level 2: 56
Level 3: 3
Level 4: 5
Level 5: 18

avatar ggppdk
ggppdk - comment - 5 Aug 2016

and total in all menus ?

avatar AnrietteC
AnrietteC - comment - 5 Aug 2016

264 menu items in total, scattered into 12 menu types.

avatar ggppdk
ggppdk - comment - 5 Aug 2016

have you seen this ?:
#4303

avatar AnrietteC
AnrietteC - comment - 5 Aug 2016

No, but I looked through the latest issues before posting and didn't see anything menu related. Maybe I missed that one.

avatar ggppdk
ggppdk - comment - 5 Aug 2016

I mean is it the same issue ?
Does it happen if you reorder the records fast ?

Are you sure it was not happening before ? (maybe it was happening more rarely ?)

avatar AnrietteC
AnrietteC - comment - 5 Aug 2016

It happens regardless of my speed. I thought maybe if I gave the scripts time to do their stuff in the background, but that didn't help as well.

No, it was not happening before, with 3.5.1. I only upgraded to 3.6.2 this week, after being on 3.5.1 for months.

avatar ggppdk
ggppdk - comment - 5 Aug 2016

Yes the problem of #4303 should appear when having menu with thousands of records

avatar ggppdk
ggppdk - comment - 5 Aug 2016

So this must something different

avatar AnrietteC
AnrietteC - comment - 5 Aug 2016

Well, I don't have thousands. 264 is about average I would guess. Plus 3.5.1 did not have do this in my case. Can you recreate this in your local environment?

avatar AnrietteC
AnrietteC - comment - 5 Aug 2016

It sort of has an order to it, I drag one item, with no sub-items anywhere in the same level. When I refresh the front-end, basically every other sub-item from other sibling items goes and sits below that item I just ordered. The back-end ordering seems unaffected. Yet, the front-end looks totally random and then after a hard-refresh, it looks normal again. I'm beginning to think some kind of browser cache is involved here. I think we can probably leave this issue on ice, and let me see if I can recreate this again.

avatar brianteeman brianteeman - change - 5 Aug 2016
Labels Added: ?
avatar DavidBoggitt
DavidBoggitt - comment - 5 Aug 2016

Have you tried the rebuild function in Menu Manager? Is it the same in all browsers?

avatar mahagr
mahagr - comment - 12 Aug 2016

@AnrietteC Do you have any trashed menu items? If you display all the menu items, are the trashed menu items in wrong place, like in middle of inner level?

avatar mahagr
mahagr - comment - 12 Aug 2016

One of our customers had a site, which had issues with menu items behaving somewhat erratic and after looking into the database it looks like ordering was wrong for trashed menu items -- they had the same lft and rgt values as some other menu items. Rebuilding menu doesn't fix the issue and trying to delete those trashed items caused wrong menu items to be deleted along with the trashed items (likely because of conflicting lft).

I have no idea why the ordering got broken in the first place (and I did try hard to reproduce it), but it seems that there's a bug in rebuilding menus which causes trashed items to be ignored.

avatar mahagr
mahagr - comment - 12 Aug 2016

I finally found out what causes the issue. If there is a (trashed) menu item which has non-existing parent, it will cause all kinds of weird issues. The menu item will be ignored when rebuilding menus and removing it may cause other menu items to disappear on delete as well.

There are some other erratic behaviours as well, like on save menu item can suddenly move to another location, disappear on save until you rebuild menu etc.

avatar mahagr
mahagr - comment - 12 Aug 2016

To recreate this issue, just take a clean install and trash one of the menu items. After that go edit the menu item from database and change its parent_id=9999. Then just rebuild menu and look into database again. Rebuild fixes lft and rgt from all the menu items except the one with bad parent.

avatar mahagr
mahagr - comment - 12 Aug 2016

@ggppdk I saw you have been working on the menu, so I will ping you just in case. Maybe your reordering pull request needs to be updated to take orphan menu items into account?

avatar ggppdk
ggppdk - comment - 12 Aug 2016

My PR (which i need to redo or rebase) is about performance,

it does not modify the behaviour, so the fix for this must be a different PR !

avatar brianteeman brianteeman - change - 2 Oct 2016
Category Administration
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Apr 2017

@AnrietteC can you confirm this Issue on latest Staging?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11476.

avatar joomla-cms-bot joomla-cms-bot - change - 6 Apr 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - edited - 6 Apr 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 6 Apr 2017
Status New Information Required
avatar franz-wohlkoenig franz-wohlkoenig - change - 27 May 2017
The description was changed
Status Information Required Closed - No Reply
Closed_Date 0000-00-00 00:00:00 2017-05-27 10:02:25
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 27 May 2017
The description was changed
Status Closed - No Reply Information Required
avatar joomla-cms-bot joomla-cms-bot - edited - 27 May 2017
avatar joomla-cms-bot joomla-cms-bot - change - 27 May 2017
Status Information Required Closed - No Reply
avatar joomla-cms-bot joomla-cms-bot - close - 27 May 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 27 May 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 May 2017

This has been closed due to lack of response to the requests above – it can always be reopened in the future if it is updated.

Add a Comment

Login with GitHub to post a comment