Can someone confirm this issue, please?

Before trying, please create a backup of your database, step 5 may lead you to a WSOD.

1. Go to: admin/build/menu-customize/primary-links/add
2. For "path" enter any existing page such as <front>, add your Menu link title, then Save.
3. Edit the same menu item admin/build/menu/item/X/edit
4. This time only change its path with the same path I added in a previous step, just instead of X put the real number: admin/build/menu/item/X/edit
5. Save.

Those steps lead me to Error 500 at BlueHost, so be careful, this critical error caused a nasty WSOD and I needed to restore my database. If anyone can confirm this issue, please report it in the issue's queue.

Comments

bwv’s picture

It might be me, but your instructions do not seem to make sense. What is the "same path I added in a previous step"?

jazzitup’s picture

Step 3: Go to admin/build/menu/item/X/edit (edit menu item)
Step 4: Replace "path" with this text: admin/build/menu/item/X/edit (look at your address bar and replace X with a number seen in your URL, which is your menu item ID)

cog.rusty’s picture

That was funny.

Another funny self-reference is to create a story and then edit it and set its URL alias to 'node/XXX/edit'. Then you can't edit it because that URL just shows it, and you need to go to admin/content/node and to use the selection filters to get rid of it.

jazzitup’s picture

I needed to create just a dummy menu and since I had to put something in path fields, I thought I could put the actual links to edit those links later with a single mouse click, but I just made myself a nightmare out of that ridiculous try. :) How should we treat it: as an insane action of a mad man, or a Drupal's issue? :)

cog.rusty’s picture

I think the answer depends on what is involved.
- If you appear in the issues queue with a bug report and you or someone post a small patch to fix it, then it will probably be considered a bug and will be fixed.
- If someone finds out that it requires a big rewrite, then the consensus will be "by design, we don't protect you from hitting your TV with a hammer", and will be closed.

jazzitup’s picture

Well said! :) But still, if I can hit my TV with a hammer, should I at least try not to allow anyone to swing heavy concrete objects near my TV - in other words, I think Drupal should resolve this error, not Apache, or PHP.

If I can put ANY URL as an alias (path) other than self-reference, or a duplicate entry, Drupal should be upgraded to follow the exact same logic, don't you think? :) Now it covers a protection for everything except for a self-reference. I know, I know... one could ask how many times people do something like that... well, guess what.. I know ONE guy, which makes my 100%. :)

cog.rusty’s picture

Sure, it doesn't hurt to submit a bug report, whatever the outcome may be.

One argument could be "since the menu already took the trouble of protecting itself from our dummy links, it is only reasonable to protect itself from this crash".

bwv’s picture

Now I do not feel so bad about having initially been so obtuse.

pwolanin’s picture

please try to reproduce this in Drupal 7 (HEAD) and post a core bug with all the details from this discussion. All bugs get fixed in 7.x first (our core bug policy).

---
Work: BioRAFT

jazzitup’s picture

I just downloaded the most recent tarball of D7-dev and this issue could be reproduced in the same way described from above. It doesn't show immediately a WSOD, but the error message in D7 repeats on every page where your menu is loaded and won't let you use your Drupal navigation (after just a few more tries it ends with WSOD): Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 2 bytes) in /var/www/drupal7/includes/database/database.inc on line 2040

To get rid of the problem, delete your last menu entry from the database, truncate your cache tables and refresh your Drupal site in your browser.

I've opened a core issue for D7 as suggested: #798190: WSOD due to self-referencing item in menu tree
D6 bug report: #796984: Self-reference protection