Share via

JS Link error on SPO

Anonymous
2016-12-22T22:07:42+00:00

Hey Everyone,

Has anyone checked JS Link property under web part properties? If not please check now. It is not working. 

Maybe Microsoft broke it while updating SPO. 

This is applicable who uses JS Link property on their SP Online environment. 

Here's what happens;

I am styling the list view using JS link. Till yesterday it was working. Today it stopped. 

Why? 

It's because, it is looking for the resource on https://static.sharepointonline.com

Whaaaaaat !!!!!!!!!!eg: https://static.sharepointonline.com/bld/\_layouts/15/16.0.6008.1206/sites/devsite/siteassets/js/structuregd.js 

When I paste the full URL on JS Link text box, it truncates the domain part upon saving. 

Eg: https://devtenant.sharepoint.com/sites/devsite/siteassets/js/structuregd.js is being saved as /sites/devsite/siteassets/js/structuregd.js

Till yesterday it used to save the complete URL. 

Note: Do not edit the existing web parts that uses JS Link. Create a new page for testing.

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2016-12-22T22:43:26+00:00

    Update from Microsoft Support:

    "Product team might be working on SPO environment like deploying new features. That may have caused the issue. we will let product team know about this issue."

    Workaround:

    Use ~site token while referencing the JS file.

    Eg: ~site/SiteAssets/js/structuregd.js

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2016-12-26T22:29:36+00:00

    This isn't an error. You should be using the tokens anyway. I've not seen any issue and we use hundreds of jslink references.

    Was this answer helpful?

    0 comments No comments