Delete Menu Item 404

Topics: Troubleshooting
Jan 13, 2014 at 7:31 PM
Edited Jan 13, 2014 at 7:51 PM
Hey there,

today I've recognized that my Orchard Installation is facing a weird problem with Orchard.Navigation. I'm running Orchard 1.7.2.

When I'm in the Admin Panel to administrate my Navigation (Admin/Navigation), I'm not able to delete any Item as it's just 404'ing.

E.g: http://localhost:30321/Admin/Navigation/Delete/70

ends up in a 404, not making it's way to the Delete Method implemented within the Admin Controller.

If I open the Core\Navigation\Views\Admin\Index.cshtml, my Visual Studio is also claiming that it's not able to find the Delete Action. I know that this is the error which causes the 404, but I've got no clue what could cuase this weird behavior.

Do you have any ideas?

Jan 13, 2014 at 7:59 PM
Edited Jan 13, 2014 at 8:14 PM
Lol, I found the error.

The Delete Method is flagged as HTTP POST, by default out of the template it's sending a GET request instead which ends up in a 404. Is this a known bug or something in Orchard 1.7.2?


Okay, If I click save all then, I'm ending up in an exception. I got the strong feeling I'm making either a massive fault or I'm lacking something totally.

Looking forward to your reply!
Jan 13, 2014 at 10:56 PM
Verify jQuery is loading properly for the admin portion of the website. When you click on the delete link jQuery will display a dialog asking if you want to delete the item. If jQuery is not loading properly, the dialog cannot be displayed and you won't be able to properly delete the item.


Jan 14, 2014 at 6:39 AM
Hey :)

Looks like my last post got not posted properly. So I try it again.

I've recognized that it should show a jQuery dialog first. So I started looking out for the issue why it is not showing it. I figured out, that that the "delete link" get's an ItemProp "UnsafeUrl" by default. The Base JS unregisters the clickEvent from all links with an "UnsafeUrl" property. That's the reason why the jQuery Dialog is not showing up.

If I remove this Itemprop from the link the jQuery Dialog shows up, cause the click Event does not get unregistered anymore. However, it is still doing a GET Request afterwards and the Delete Method implemented in AdminController is set to HTTPPost.

The only way I can get it work is by removing the HTTPPost attribute on the Delete method and by removing the UnsafeUrl prop from the delete link.

As this is would be a patch to Orchard.Navigation I assume I'm either missing something or I'm doing something wrong. If Orchard.Navigation would have such a bug, more users would have claimed it already, wouldn't they?

Thanks for your help!

Jan 15, 2014 at 4:27 PM
Edited Jan 15, 2014 at 4:47 PM
Wow, I've figured out that this problem exists not only for MenuItem but also for every other contentTyp delete action. What am I doing wrong? :)


Ok, I digged a little more trough it and apparently, this function never get's hit (in base.js):
$("body").on("click", "a[itemprop~=UnsafeUrl]", function() {
That's obviously the reason, why nothing is working anymore. However, I don't see why it doesn't got hit?
Jan 15, 2014 at 10:54 PM
Edited Jan 15, 2014 at 10:54 PM
It's not a bug in Orchard. It is a problem with your installation.

I've seen these types of problems when jQuery is not running properly in the backend. Usually just restarting the application or recycling the app pool solves the problem unless you have other scripts running that are interfering with normal JavaScript/jQuery operations. In that case you need to just open the browser console/debugger and find the JavaScript problem.

If that is not the case and another module isn't overriding the route ( I doubt it ), I recommend just creating a fresh install of Orchard 1.7.2 and moving your database, media files, modules, and other content to a fresh install. Essentially just act like you are doing an upgrade. What you are experiencing is not normal and trying to fix controllers, views, drivers and other core Orchard assets is a waste of time. It's not a bug in Orchard 1.7.2. It's a problem with your specific environment.

Unfortunately, I can't be more specific without seeing it firsthand. I'd love to know the problem if you figure it out :)


Apr 7, 2014 at 8:58 AM
Hi David,

You wrote that this is not orchad bug, Strange, but I'm affected with the same issue caused by the same line of js code. When I rollback change to previous version all works fine.

Not sure what is wrong with my instalation because we took the neewest 1.7.2 version. Jquery is 1.9.1. Please let me know if you have more information what we could do about it.
Apr 9, 2014 at 6:16 PM
Upgrade to the newer Orchard 1.7.3 or 1.8 and let me know if you are still having the problems.

If so, contact me through my website at:

and I'll try and help you debug the problem.

I've had this problem before and it has always been a jQuery issue on the website.