Site getting scriptmanager error in CMS page tab.

Jon Tibbetts asked on September 12, 2014 16:38

If logged into my kentico 8 cms, my page tab does not work. But if logged out of the site, my site works fine.

Image Text

Recent Answers


Brenden Kehren answered on September 12, 2014 21:56

Does your page, page template or webpart on the page have a script manager on it? If so, remove it. By default, the base Kentico template object is already inheriting the script manager and placing it on the page for you.

0 votesVote for this answer Mark as a Correct answer

Jon Tibbetts answered on September 12, 2014 22:13

Was this only an issue in Kentico 8.0, cause I have used the same mark up code in 7.0 and viewing the pages from the CMS was fine. Now if I view the pages not in the CMS everything looks fine. Is there a way to disable to Kentico from inherting the script manager.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on September 13, 2014 04:54

There is not a way without modifying base code or controls. Any particular reason you need to add the script manager? It is used in the UI heavily. It is also used outside of the UI, for instance if in a webpart you choose to have an Update Panel around the webpart then the script manager needs to be on the page whether or not you decide to have it or not. Best bet is to remove it from any of your controls.

1 votesVote for this answer Mark as a Correct answer

Richard Sustek answered on September 14, 2014 12:58

Hi,

Thank you Brenden for answering, you are absolutely right.

This has also been resolved in ticket by removing the additional instances of Script manager which were really present in Master page. Removing them fixes the issue.

Kind regards, Richard Sustek

0 votesVote for this answer Mark as a Correct answer

Jon Tibbetts answered on September 15, 2014 19:28

Removing the scriptmanager is not problem for .js files cause those can be registered the following way,

but what if I have an asmx file I need registered. Example... See the services section

<asp:ScriptManagerProxy ID="ScriptManager1" runat="server"> </asp:ScriptManagerProxy>

0 votesVote for this answer Mark as a Correct answer

Jon Tibbetts answered on September 15, 2014 19:29

<asp:ScriptManagerProxy ID="ScriptManager1" runat="server">
<Scripts>
    <asp:ScriptReference Path="~/App_Atom/AjaxSearch/Scripts/jquery.json-2.2.min.js" />
    <asp:ScriptReference Path="~/App_Atom/AjaxSearch/Scripts/BaseFacet.js" />
</Scripts>
<Services>
    <asp:ServiceReference Path="~/App_Atom/RecapCenter/webservices/RecapWS.asmx" />
</Services>

</asp:ScriptManagerProxy>

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on September 16, 2014 13:52

If you continue to receive your initial error then the problem is having 2 instances of the script manager, whether it's the proxy or not, it won't work. Since you're not using Portal development mode, you might look in your page or master page template code and find out what they are inheriting. If you're using Portal development mode you can simply add the JavaScript webpart to the page and input your scripts in there using the standard AJAX call.

0 votesVote for this answer Mark as a Correct answer

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