During page creation, duplicate menu items are created. I thought this was an incompatibility issue with the Block Title Link module. But even with that disabled, it is still occurring. So I believe this is a separate issue. Thank you!

CommentFileSizeAuthor
#3 1372972-3.patch714 bytesultimateboy
#1 menuux-7.x-1.x-beta2.patch314 bytesdmitrii
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dmitrii’s picture

Status: Active » Needs review
FileSize
314 bytes

I wrote a patch that solves the problem of duplicates when saving menu.
I deleted the duplicates menu items with the sql-query:
delete FROM `menu_links` WHERE `menu_name`='0'

georgwaechter’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm this. This is only a minor bug, but it creates many useless database entries and as many PHP warnings that fill up the drupal logs.

The problem in detail: The method menuux_node_form_submit does save a menu link even when the user hasnt chosen a menu. The patch in #1 by dmitrii solves this, we have tested it.

Please commit and release a new version.

ultimateboy’s picture

Priority: Normal » Major
FileSize
714 bytes

I came across this issue after a site I maintain began returning 503s on various pages. This ended up being caused by running out of php memory while trying to set the menu cache. I eventually tracked this to {menu_links} where I found about 14k entires on a site with about 800 nodes - something definitely wasn't right. I quickly realized that 12k of said entries had a "menu_name" of "0".

I'm bumping this to "major" as it can have really bad side effects once a site has been running for a while. I've amended the patch provided in #1 to include an update script to remove the extra items this module had added to {menu_links}.

stixes’s picture

I concur with @ultimateboy that this is a major issue. I causes a serious buildup in menu_links which is traversed in a lot of page request leading to significant load times and memory issues. We run a site that regularly imports data which lead to ~40k entries in menu_links, page loading in 3-4 minutes for cached data and huge memory consumption.

The patch and update from #3 does however fix this issue.

ultimateboy’s picture

Priority: Major » Critical

Given this has been just sitting here.. I have no choice.. This is a huge deal.

steven.wichers’s picture

This bug was causing 10+ second page load times on one of our sites. We had approximately 4,000 bad menu items in the table. When the breadcrumb was attempting to check permissions for pages it wound up loading all content that had a bad menu item. Deleting all bad items reduced page load time from 10+s to 1-2s. We have another site with approximately 800,000 bad menu items (MANY are duplicates). I suspect another performance gain when we remove those.

falcon’s picture

Status: Reviewed & tested by the community » Fixed

Commited, thanks for the fix. I might commit the next one even faster! :)

Status: Fixed » Closed (fixed)

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