SPServices only working for Site Collection Administrator

rss

Posted by olavur - Sep 5 ’14 at 05:21

Hello,

I use SPService like this:

window.$().SPServices({

..some code

});

It works fine as long as I am site collection administrator. I have included this in the masterpage where I use jquery 1.11.1.min.js:

<script src="/_catalogs/masterpage/jquery-1.11.1.min.js"></script>

<script src="/_catalogs/masterpage/jquery.spservices-2014.01.min.js"></script>

I have figured out, that when I am NOT site collection administrator this is incloded in the source code (This is NOT included when I am NOT administrator):

<link rel="stylesheet" type="text/css" href="/style%20library/FormsDesigner/jquery-ui-1.10.3.custom.min.css?rev=2_8_1"/>

<link rel="stylesheet" type="text/css" href="/style%20library/FormsDesigner/Form.css?rev=2_8_3"/>

<script src="/style%20library/formsdesigner/jquery/jquery-1.10.2.min.js"></script>

<script src="/style%20library/formsdesigner/jquery/jquery-ui-1.10.3.custom.min.js"></script>

<script src="/style%20library/formsdesigner/jquery/jquery.cookie.js"></script>

<script src="/style%20library/FormsDesigner/form.min.js?rev=2_8_6"></script>

So when I am administrator I can test thw window.$() in the debugger consol of the browser but when I am NOT administrator the debugger does not find the $() function.

Any ideas why this is happening?

Could it be that the $() function is not included in the jquery-ui-1.10.3.custom.min.js?

How do I then make SPForm use jquery 1.11.1?

Thanks

Olavur

 

 

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 8 years 4 months 1 day
    #1 by Dmitry Kozlov Sep 6 ’14 at 09:54

    Hello Olavur,

    Please, make sure that the files jquery-1.11.1.min.js and jquery.spservices-2014.01.min.js are loaded for non administrators. Probably, you should approve them or put into another library e.g. Style Library and provide users with read permission.

  • olavur
    Member
    Member for: 7 years 11 months 10 days
    #2 by olavur Sep 8 ’14 at 09:23

    [#1]: I moved jquery and spservices to the Style Library and modified the link on my master page to load from the Style Library.

    Now everything works fine smile

    Thanks

Displaying 1 to 2 of 2 messages