Problem/Motivation

Menu Links getting duplicated when trying to add new links.

The Mega menu structure was already defined and it was appearing perfect. But then we had a requirement to add new link to the menu and to our surprise adding the new link distorted the Mega Menu. The links got duplicated and and some links went missing and the duplicated links took there place.

Important to note that the duplication only appeared on Mega menu and not on the Actual Menu.

Steps to Reproduce

  1. Create a Mega Menu for Main Navigation
  2. After Saving add new links to main navigation to a submenu Item already defined

I have attached a screenshot of the same. The menu item "sister local" on the highlighted column was added later on. which resulted in the breakdown.

Comments

Lokeshwari created an issue. See original summary.

knaffles’s picture

Status: Active » Needs review
StatusFileSize
new649 bytes

Can you try applying the attached patch and see if it fixes the issue for you? Thanks!

crasx’s picture

StatusFileSize
new662 bytes

Thanks so much for the fix! Working well on my end. To validate I did the following:
- Moved a child menu item using the menu UI to place tbmm in a "broken" state.
- Confirmed the error was present in the tbmm UI (ie: Saw my links had been duplicated)
- Applied the above patch
- Refreshed the tbmm page and confirmed the error was gone (ie: did not see duplicate items).

I updated the patch to remove an unused line, also added some spacing

imclean’s picture

I can confirm the patch in #2 removes the duplicate links for us.

imclean’s picture

I didn't mean to hide #3, I hadn't refreshed the browser before posting. #3 looks good but adds 2 blank lines. These should be removed from the patch as they aren't related to the fix.

imclean’s picture

Version: 8.x-1.6 » 8.x-1.x-dev
Status: Needs review » Needs work
crasx’s picture

Status: Needs work » Needs review
StatusFileSize
new627 bytes

Fair!

knaffles credited emb03.

knaffles’s picture

Status: Needs review » Fixed

Patch #7 has been merged into the 8.x-1.x branch and will be included in the next release. Thanks everyone!

  • 2bd06be committed on 2.x
    Forwardport fix for issue #3259541 to fix duplicate links when a new...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.