Delete Commands (Users, Content Menu Items, Custom Form Items) Not Working After Upgrade

Topics: Administration, General, Installing Orchard
Jul 23, 2014 at 9:02 PM
Edited Jul 23, 2014 at 9:05 PM
Has anyone else had the issue of delete commands not working after upgrading to 1.8.1? We have 6 orchard sites and on three of them, we are unable to delete users, content menu items and custom form items. There is nothing in the logs. When delete is clicked, nothing happens and no message is displayed.

BTW, we have had a horrible time in terms of performance with orchard in general. Memory usage and cpu usage extremely high. After an app pool recycle, the pages run fine for about 30 minutes and then slow, slow, crash. We are not running any custom modules other than CKEditor and a password reset module (why we need a custom module to reset our own passwords seems a little whacko to me). Anyway, we resolved these issues for the most part by making our app pools run on 32 bit mode and changing the fcnMode to single and took the advice of this article (even though that is for .net 2.0 it seemed to help). I don't understand why it takes so much pain to get orchard to behave.

Anyway the only unresolved issue right now is not being able to delete. Any ideas?

Thanks in advance,
Jul 23, 2014 at 9:11 PM
After looking at the generated source. The delete links all have this - itemprop="RemoveUrl UnsafeUrl". What is putting these on?
Jul 24, 2014 at 3:52 PM
I came up with a fix for this. The offending javascript is located in /Core/Shapes/Scripts/base.js. I changed one line and it started working

Bad Code

$("body").on("click", "a[itemprop~=UnsafeUrl]", function() {

I changed to

$("a[itemprop~='UnsafeUrl']").click(function() {

It seems crazy to me that I cannot find anyone on the web with the same problem. I noticed that older versions don't reference the click handler the way 1.8 does. Was there any reason for the change?
Jan 16, 2015 at 2:30 PM
dharmon23 wrote:
It seems crazy to me that I cannot find anyone on the web with the same problem.
Fear not, I recently upgraded to 1.8.1 and found the same issue. Your fix worked a treat, thanks for posting. I have created a bug for this, workitem #21144, please upvote when you have a moment :)