Hi,

When I flush the administration menu cache, the structure of the menu is scrambled. I suspect that the problem was created long ago and has been sitting dormant, waiting for me to flush the cache.

If I roll back to a early version and then check the menu structure at:
http://www.pensionen-mit-charme.de/admin/build/menu-customize/admin_menu
I see menu is structured well. Then after flushing the admin menu cache, and checking the menu again, I see it is scrambled.

* I did notice an orphan menu item for the Tagadelic module even though I have deleted this module. Could this be part of the problem?
* I hoped that by deleting the orphaned tagadelic menu item this problem might be solved. I tried the options here: http://drupal.org/node/777964#comment-3154804 to delete it successfully, but then when I went to clear the admin menu cache, the problem re-occurred
* I have tried disabling admin menu and re-enabling.
* I have been through the admin menu issue queue and didn't find anything I thought could be the cause.
* I have also googled around drupal but no leads so far.

A few questions:
1) Cause: What could have caused this problem? Any ideas?
1) Manual fix: Does anyone know a practical way to manually rearrange the menu in this situation? I have a lot of modules and the drag'n'drop becomes unusable for the administration menu?
2) Automated fix: Is there something else I can do to reset the admin menu?

For now, I have rolled back to an earlier version and am steering clear of the reset button... But it would be nice not to have this little time-bomb sitting there.

Cheers,
Jim

Comments

Anonymous’s picture

Was able to reproduce this and I didn't have tagadelic. Happened on the 6.x-3.0-dev and alpha4 versions.

aaron’s picture

Version: 6.x-3.0-alpha4 » 6.x-3.x-dev

subscribe. same behavior.

aaron’s picture

After this has happened (and a restore of the db from before the scrambling), I see that the menu is not scrambled beforehand. It appears that the Content Management menu item loses its place, or that all the items within it are orphaned -- editing the children of that page shows they're in the Navigation menu. Going through each of those children items, reseting them, and flushing the admin cache again seems to fix the problem.

sun’s picture

Can someone clarify what is being meant with "scrambled"? If it helps, also post a screenshot.

So far, I get that there seems to be some kind of a relation to 'customized' => 1 menu links in the administration menu, and when flushing caches (all caches or a particular one?), the menu no longer contains the expected links or something.

pillarsdotnet’s picture

I had the same problem. I had customized many (most) of the menu links, shortening the names so they don't wrap to two lines. After performing an upgrade (site.com/update followed by site.com/civicrm/upgrade?reset=1) and clearing cache, most of the customized menu links were reparented to the menu root. Items that earlier were showing under "Content Management", "Site Building", or "Site Configuration" appeared as separate items on the main admin_menu bar.

I visited admin/build/menu-customize/admin-menu and reset every single menu link, and now there are multiple "Site Building" and "Site Configuration" links showing on the admin_menu bar, and much of the menu structure is unreachable from admin_menu now.

I'd be happy to reset the entire menu structure to defaults, clearing all customization and losing all custom menu entries, but I don't know how and there is no UI for doing so.

Apparently, in Drupal, the whole menu-customize function should be marked with a big red flashing neon sign saying "If you touch anything here, your site WILL eventually be broken, and you'll be reduced to manually editing database records with no documentation and no support."

pillarsdotnet’s picture

StatusFileSize
new1.05 MB

Screenshot of the current brokenness...

pillarsdotnet’s picture

Manual fix here worked for me:

http://drupal.org/node/149562

And root cause may be here:

http://drupal.org/node/511804

sun’s picture

the whole menu-customize function should be marked with a big red flashing neon sign saying "If you touch anything here, your site WILL eventually be broken, and you'll be reduced to manually editing database records with no documentation and no support."

AMEN, brother!

pillarsdotnet’s picture

Patch submitted. No flashing, but it is big and red, at least.

http://drupal.org/node/511804#comment-3989706

sun’s picture

Status: Active » Needs review
StatusFileSize
new4.13 KB

Not sure whether this helps...?

Status: Needs review » Needs work

The last submitted patch, admin_menu.rebuild.10.patch, failed testing.

aaron’s picture

FYI, for anyone experiencing this problem, disable & uninstall the admin menu module, go to /admin/build/menu-customize/admin_menu/delete and hit delete (can't do it from the usual edit screen because the menu name contains an underscore, which core doesn't like), then reinstall the module.

ptoly’s picture

@aaron
Thanks! That was a life saver!

alexbk66-’s picture

I hate Drupal! Excellent time waster, if you are looking to kill time...

I upgraded admin_menu from 6.x-1.6 to 3.0-alpha4, as recommended in #246653: Duplicate entry in menu_router: Different symptoms, same issue. My Admin menu is now broken, just has:

Home
Drupal Tweaks
Advanced help

http://hobbyblob.com/admin shows only 'Drupal Tweaks'.

After spending hours reading the forums, changing themes to Garland, running update.php, clearing caches, backing up and restoring - I'm back to 6.x-1.6! Thank you.

sfyn’s picture

StatusFileSize
new132.62 KB

Trying to reproduce, running a fresh download of current head,

I have two new items added manually to the administration menu.

One, a menu item added directly through the admin/build/menus interface, shows up on cache refresh,

The second, a menu item created via a node, shows up in the menu interface but not in the menu, after clearing the cache. Screenshot attached.

And so far, no scrambling...

sfyn’s picture

Still trying to reproduce,

I've noticed that if I mark items as expanded and then flush the cache, they are reset.

sfyn’s picture

Reproduced.

We attempted to edit the page that was not visible in the menu in #15, and when we returned to the menu admin page, we got this bug. Yay!

We have reproduced this twice now by:

1. Installing and upgrading to 3.0-alpha4
2. Creating a custom menu item, pointing to a node in admin menu
3. Mark the new item and Reports as expanded.
4. Save the menu.

sfyn’s picture

Tried the patch in #10 - by applying the changes manually since we could not apply it automatically against 6.x-3.0-alpha4.

Reused our steps to reproduce from #17 and same error occurs, with Reports being displaced to under our custom menu item.

Note that I wouldn't describe this as scrambling, because the error is predictably to place the expanded submenu item under our custom item...

sun’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Issue tags: +D7 stable release blocker
mas0h’s picture

Thanks aaron, you saved my life!

herb81bp’s picture

Version: 7.x-3.x-dev » 6.x-3.0-alpha4
Assigned: Unassigned » herb81bp
Status: Needs work » Fixed
Issue tags: -D7 stable release blocker +D6 stable release blocker
StatusFileSize
new2.33 KB

Hi,
By appliing this patch, everything work fine with this admin_menu version. It was problem when flushed the caches with costumised menu items and by admin menu module reinstalling. I make this patch after i apllied two others patches (so it work with those together):

Status: Fixed » Closed (fixed)

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

aaron’s picture

Version: 6.x-3.0-alpha4 » 7.x-3.x-dev
Status: Closed (fixed) » Active
Issue tags: -D6 stable release blocker +D7 stable release blocker

I'm glad that works for you. However, the issue has not yet been fixed with the module. Setting the status back to active for now.

aaron’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, scrambled_admin_menu_strucutre.patch, failed testing.

d34dman’s picture

Linking issue link to this post as its very similar if not same.

Sorry this post was supposed to go to the the other thread.

d34dman’s picture

StatusFileSize
new674.67 KB
new350.33 KB

Moar Screenshots!

Version: 6.x-3.0-alpha4
Screenshot Attached: here
Source code of the page: here (taken using view source in google chrome and saved it on desktop. It looks pretty if you rename the extention to .htm and view it in a browser)

Actions taken:
1> Disabled and un-installed Administration menu. Installed again. The issue persists.
2> Disabled Administration Menu. No scrambling occurs.

Observation:

1> Don't know if this issue popped up before or along with scrambling. Most of the pages now requires to be loaded twice to view it. Like on first access ( form submits too) it presents a blank screen (WSOD). Then you would have to visit the same url again (i do that by pressing enter after placing the cursor at the end of url ).

2> Scrambling happens irrespective of theme, tested on Garland, Cube and JournalCrunch.

3> Disabling administration menu stops the scrambling from occuring. It also removed the issue of double page load required to access the page.

4> Disabling administration menu also dramatically improved the page load performance from 30 seconds to 5 seconds on my local machine.

I have not fiddled with the code of administration menu yet. Is there something you want me to test before i do :)

Linking this previous issue to this post as its very similar if not same.

d34dman’s picture

continuing #27 Moar Observation:
Sorry for spamming, but this one escaped my observation last time

After disabling and un-installing Administration menu. The enabling procedure gives some curious result.

1> Click on the checkbox to enable Administration menu in admin/module/list page.
2> submit the form.
3> ERROR_WSOD: White screen of death :C!.
4> Reload the page again by placing the cursor at the end of the url and hitting enter. ( in the omnibar in chrome ).
5> Administration menu appears as expected on top without scramble.
6> Refresh the page or navigate to any other page.
7> ERROR_SCRAMBLED: scrambled output on top of the page :C , and missing Administration menu :'C.
8> ERROR_SCRAMBLED:Visit admin/build/themes/select (by typing it in omnibar).
9> ERROR_SCRAMBLED: Select a different default theme and submit the form.
10> ERROR_WSOD
11> Reload the page again as mentioned in step 4.
12> error less page with administration menu and a different default theme.
13> Subsequent refresh or navigation to any other page gives either ERROR_SCRAMBLED or ERROR_WSOD

what it appears to me was some caching issue. so i visited site performance and disabled page compression.
HOLA! it works. it simply worked. so right now am =D happy. But would only be more than happy to carry out any specific test if you want to.

sun’s picture

Status: Needs work » Active
sun’s picture

#442560: Admin menu disappears (randomly), needs either cache to be emptied on every page or page refresh several times has been committed to 7.x-3.x. Can you test the 7.x-3.x branch using git - or alternatively, if you don't have git, the 7.x-3.x-dev development snapshot tomorrow (after the snapshot has been re-created)?

sun’s picture

Status: Active » Fixed

I'm relatively sure that aforementioned patch also fixed this issue.

d34dman’s picture

Hi sun,
I had faced issue in Version: 6.x-3.0-alpha4,
As you can see this issue had swayed between 6.x and 7.x,
what should i do to test the patch on 6.x

Status: Fixed » Closed (fixed)
Issue tags: -D7 stable release blocker

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