Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When I delete a page, post or category that has previously been added to a custom menu, the delete routine is apparently not checking to see if the item belongs to a custom menu, and thus its not removing it from the custom menu.

This results in a 404 page error when the menu item is clicked on from the website.

So as the code is now, its up to the user to (1) have knowledge of this behavior and (2) remember to delete the item from BOTH places, to avoid embarrassing 404 "not found" and search bot crawl errors.

Is this a known bug/design flaw? It seems entirely counter-intuitive if its known and allowed to stand as is.

I should note, as pointed out below by Maugly, that once the item is removed from "Trash", WordPress finally removes it from any custom menus. However, this is counter-intutive the the way all other WordPress menus operate. As soon as you place an item in the trash, its removed from "Pages" and "Recent Posts" widget listings, why not the same behavior for custom menus?

I'd err on the side of consistency, and even more importantly, link integrity. Users should not expect custom menus to follow a completely different set of rules with respect to deleting pages and posts than other menus.

share|improve this question

1 Answer 1

Empty your trash :)

Pages are not removed from the custom menus until they've been deleted completely. I've tested it right now.

Creating a complex nav menu can take a very long time and the pages can be bulk deleted in a sec. I believe WordPress is just trying to save you all the trouble in case of an accident.

Deleted categories are removed from nav menus instantly.

share|improve this answer
    
OK, point taken, but there's an inconsistency here. Why not treat the custom menu the same as "Recent Posts" or any other menu. As soon as an item hits the trash, its no longer shown in ANY menu other than the custom menu. Why treat custom menus differently? Its inconsistent and creates unnecessary support issues. –  N2Mystic Aug 17 '11 at 15:56
    
This isn't the correct place to be asking, better asked in the feedback forum on wordpress.org or raised in a ticket on trac. –  Mark Duncan Aug 17 '11 at 16:30
    
Thanks for the suggestion Mark. –  N2Mystic Aug 18 '11 at 22:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.