Jquery error on newly created backend pages

Posted by Community Admin on 04-Aug-2018 17:30

Jquery error on newly created backend pages

All Replies

Posted by Community Admin on 17-Dec-2015 00:00

I've created a new backend page, under the "User Management"
folder. However, as soon as the page is loaded, even before
I insert any widgets there, I get a javascript error:

"Uncaught TypeError: jQuery is not a function"

In the following code:

<script type="text/javascript">
    if (jQuery(".sfSiteSelectorMenuWrp").length > 0)
        jQuery("body").addClass("sfHasMultiSite");
</script>

which is sitefinity native code.

The reproduction steps are: 
Administration->BackEnd Pages->User Management - Create Child Page

Has anyone else had this problem before?

Best regards,
Diogo Bastos

Posted by Community Admin on 22-Dec-2015 00:00

Hello Diogo,

On which version you are observing that behaviour? Are you using the default template, custom one or start from scratch? 
In case of custom template do you have any scripts loaded?

Testing it on 8.2 works fine. The page is created without any errors using the default template or start from scratch (screenshot).

Regards,
Svetoslav Manchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 31-Mar-2016 00:00

We have the exact same problem after an upgrade to 8.2. Did you figure out what caused it?

Posted by Community Admin on 05-Apr-2016 00:00

Hello Nelson,

What is the jQuery version used in your project? Sitefinity 8.2 uses jquery 1.11.2.

You can check also under: Administration > Settings > Advanced > Pages > Script Manager > Script References > JQuery
In case there some different version is loaded.

Regards,
Svetoslav Manchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 05-Apr-2016 00:00

Hello, sadly I did not figure out the problem. After making sure that the Jquery versions matched and that the problem was not in the configurations, I resigned myself to creating a new page template and loading the scripts with script widgets.

Hope this helps.

Regards,

Diogo

Posted by Community Admin on 11-Jul-2017 00:00

Hello, we have this exact same problem when creating a new backend page. After some trying, the solution that we use is importing jQuery manually from custom ascx file used in that page by using Sitefinity Resource link, like so:

<sitefinity:ResourceLinks ID="resourcesLinks" runat="server">
    <sitefinity:ResourceFile JavaScriptLibrary="JQuery" />
</sitefinity:ResourceLinks>

Hope this helps to whoever encounter this problems in the future

This thread is closed