Not able to move widgets above/below another widgets within same widgetzone

Shweta S asked on July 28, 2017 20:36

The widgets have + icon to drag and drop but they are not working. It is giving me following error on the console.

Uncaught TypeError: Cannot read property 'UI' of undefined
    at RegisterCMSDragDropBehavior (GetResource.ashx?scriptfile=~%2fCMSScripts%2fDragAndDrop%2fDragAndDropBehavior.js:1)
    at CMSExtendedControls.DragAndDropBehavior (GetResource.ashx?scriptfile=~%2fCMSScripts%2fDragAndDrop%2fDragAndDropBehavior.js:1)
    at H.w.create (ScriptResource.axd?d=x6wALODbMJK5e0eRC_p1LZXm1OurRLHeqbETSYcNwCDR8Up5o0Rlwx9ZC_UgQ86Jk2xmN_NhKmnhK-…:2)
    at Array.<anonymous> (Volunteer.aspx?viewmode=3&showpanel=1&cmscontentchanged=false&lang=en-US&langobjectlifetime=request:1721)
    at ScriptResource.axd?d=x6wALODbMJK5e0eRC_p1LZXm1OurRLHeqbETSYcNwCDR8Up5o0Rlwx9ZC_UgQ86Jk2xmN_NhKmnhK-…:2
    at Function.H.w.raiseEvent (ScriptResource.axd?d=x6wALODbMJK5e0eRC_p1LZXm1OurRLHeqbETSYcNwCDR8Up5o0Rlwx9ZC_UgQ86Jk2xmN_NhKmnhK-…:2)
    at H.b._Application._raiseInit (ScriptResource.axd?d=x6wALODbMJK5e0eRC_p1LZXm1OurRLHeqbETSYcNwCDR8Up5o0Rlwx9ZC_UgQ86Jk2xmN_NhKmnhK-…:2)
    at H.b._Application._doInitialize (ScriptResource.axd?d=x6wALODbMJK5e0eRC_p1LZXm1OurRLHeqbETSYcNwCDR8Up5o0Rlwx9ZC_UgQ86Jk2xmN_NhKmnhK-…:2)
    at ScriptResource.axd?d=x6wALODbMJK5e0eRC_p1LZXm1OurRLHeqbETSYcNwCDR8Up5o0Rlwx9ZC_UgQ86Jk2xmN_NhKmnhK-…:2
    at ScriptResource.axd?d=x6wALODbMJK5e0eRC_p1LZXm1OurRLHeqbETSYcNwCDR8Up5o0Rlwx9ZC_UgQ86Jk2xmN_NhKmnhK-…:2

I removed all css and javascript files from my master file to make sure it is not causing the issue.

I only have below files in my master.aspx file

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" />      

There are similar questions asked before but the solutions are either not application to me or they didnt work.

Correct Answer

Dawn Stanford answered on August 25, 2017 22:04

I've resolved the issue for my case. I was still using the <ajaxToolkit:ToolkitScriptManager> in my Base.master. I've replaced with <asp:ScriptManager> and it resolved the problem.

Hope this helps.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Juraj Ondrus answered on July 31, 2017 10:09

Hi,
What version of Kentico are you using?
I would try removing all the scripts and/or make the page's page template not to inherit any content from master/parent templates and/or create a completely blank page template with no inheritance to see if it will help or not.
Also, do not forget to clear the browser cache just in case.

0 votesVote for this answer Mark as a Correct answer

Shweta S answered on August 1, 2017 21:12

Hi Juraj,

I am using Kentico 10 version but I tried on another site which is on Kentico 9 and it works on that site (not sure if that makes any difference). I created a new template which does not inherit any master file. The template has no extra code, just the jquery and jquery ui plugin.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on August 2, 2017 11:56

You said "The template has no extra code, just the jquery and jquery ui plugin." - is the issue persisting when you remove this code and plugin from the template?

0 votesVote for this answer Mark as a Correct answer

Shweta S answered on August 2, 2017 18:56

Same error even after I remove plugins from the template. Basically the template just has a webpartzone.

0 votesVote for this answer Mark as a Correct answer

Dawn Stanford answered on August 25, 2017 17:53

Hello,

I am experiencing similar issue when viewing pages in Kentico after upgrading from 9 to 10. The error I am getting is here:

Uncaught ReferenceError: CommonToolkitScripts is not defined
at CMSExtendedControls.DragAndDropBehavior.set_onBeforeDrop (GetResource.ashx:1)
at Function.H.w._setProperties (ScriptResource.axd:2)
at H.w.create (ScriptResource.axd:2)
at Array.<anonymous> (Home.aspx:3450)
at ScriptResource.axd:2
at Function.H.w.raiseEvent (ScriptResource.axd:2)
at H.b._Application._raiseInit (ScriptResource.axd:2)
at H.b._Application._doInitialize (ScriptResource.axd:2)
at ScriptResource.axd:2
at ScriptResource.axd:2

Additionally, just ahead of this issue I see 4 404 errors for the following request: https://blackhillsfcu.local.zagclients.net/CMSTemplates/BlackHillsFCU/Home.aspx?_TSM_HiddenField_=ctl00_manScript_HiddenField&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.60919.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aee051b62-9cd6-49a5-87bb-93c07bc43d63%3aa43b07eb

0 votesVote for this answer Mark as a Correct answer

Shweta S answered on August 25, 2017 23:43

Dawn,

Oh my God, I can't thank you enough. It works perfectly. Thank you so much for posting the solution.

Thanks!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.