jQuery functions and plug-ins dysfunctional inside Sitefinity and on page while authenticated
Hello Telerik, I've used jQuery's UI plugin for our website navigation and a few other plug-ins here and there to enhance website usability and aesthetics. Of course, when page is viewed, everything works fine. But when I authenticate, all jQuery plug-ins seem to stop working properly, they won't even initiate.
I think they have ran into serious compatibility issues with the scripts being injected by Sitefinity (which I understand are vital for the CMS tools to work). How can I address this? I have tried adding the compatibility measures set forth by the jQuery team itself in order for jQuery to work with other libraries but to no avail. Please help. Thanks.
Hi jkregala,
You can try using ResourceLinks control to add embedded jquery-ui-1.8.8.custom.min.js on the page.
<sitefinity:ResourceLinks id=
"resourcesLinks"
runat=
"server"
>
<sitefinity:ResourceFile Name=
"Telerik.Sitefinity.Resources.Scripts.jquery-ui-1.8.8.custom.min.js"
Static=
"true"
/>
</sitefinity:ResourceLinks>
Where can I add the lines of code you provided? On the master page itself? I also presume the ResourceLinks control you specified is for the jQuery UI interface library. How about for the other plug-ins?
I also added the scripts exactly before the closing body tag </body> to no avail.
Hi jkregala,
If you want to load jQueryUI on a group of pages you should better add the code to a template. For particular pages, use a single control.
Greetings,
Ivan Dimitrov
the Telerik team
But I am using a master page as basis for this particular template, so the code should go to the master page right?
Is it possible for me to use the syntax you provided and lead to the paths of the .js files instead of using Sitefinity's built-in? You see, jQueryUI is not the only one we're using, there are about several others. And I doubt that you have them all.
Is it only when you authenticate as admin? Reason I ask is because that black "Edit" tab Sitefinity injects on the right-hand frontend for admins always conflicts with my Javascript and CSS.
Hi Basem, yes. Everything's fine when I'm not authenticated. It's crazy.
But what if you authenticate with a user who is not an administrator. Try creating a custom role and a new user under that role (don't give admin rights). Now try viewing the frontend again authenticated as that new user. That black edit tab should not exist anymore and I bet you won't have jQuery problems.
But that Black tab is kinda handy, a nifty feature if you ask me. I just wish they assigned special ID's or classes for whatever is included in the black tab feature so they could've developed CSS and javascript functions that would specifically target it and not everything on the page. What's the purpose of creating your own design if it's going to be tampered with right? A big hassle to create overwriting measures too. That is what we're trying now.
I am just telling you to try for troubleshooting purposes. If the problem goes away, then you are 100% sure the problem was the black edit tab. I have been trying the SF team to fix that ever since it came out.