Jquery conflict when logged in

Posted by Community Admin on 04-Aug-2018 14:16

Jquery conflict when logged in

All Replies

Posted by Community Admin on 18-Sep-2012 00:00

When logged into Sitefinity and on the front end of the site I get a jquery error. This appears to be due to the fact that Sitefinity automatically includes a version of jquery when I'm logged in. Is there anyway I can stop this?

Did you not think this would cause issues as chances are a microsoft developer is going to use jquery as their preferred javascript library?

Posted by Community Admin on 18-Sep-2012 00:00

Ruth,

This has been a known issue with Sitefinity for a while.  My suggestion is to NOT include your own version of JQuery into you page template and instead add the following code just inside the <form> tag.

<sf:ResourceLinks ID="MyResourceLinks" runat="server">
    <sf:ResourceFile JavaScriptLibrary="JQuery" />
</sf:ResourceLinks>

This will include JQuery into your site and NOT cause conflicts any more.  But, this still poses one down side.  This will NOT include JQuery into the HEAD of the web page but at the top of the body.  So any JQuery you end up using on the page will need to be down inside the body or  just before the ending BODY tag.  Hope this helps.

Enjoy!

Posted by Community Admin on 18-Sep-2012 00:00

Thanks for your response Craig.

I've just realised it's possible to disable inline editing, a by product of doing this is that jquery does not get included. I think I would prefer to do it this way as then we're not tied to the older version of jquery and that way the scripts can remain in the head.

Posted by Community Admin on 18-Sep-2012 00:00

Ruth,

I am curious how you were able to disable the inline editing.  This could be helpful for some stuff I am also working on.  Thanks.


Craig

Posted by Community Admin on 18-Sep-2012 00:00

Craig - go into the backend and then Settings>Advanced>Pages, scroll down to "Enable in-line editing" and set it to false.

This thread is closed