1

I've done the following:

  1. List item
  2. Created an OOTB SharePoint 2013 site
  3. Uploaded some javascript to _catalogs/masterpage (as a JavaScript Display Template)
  4. Published the javascript file.
  5. Created a new page
  6. Added a list view webpart to the page, and set the JSLink to refer to the JS file in #2 (I've tried absolute references, plus ~site and ~sitecollection-prefixed references).
  7. Published the page.

While I understand my template may not be perfect (and hence I put a 'debugger;' line near the beginning of the anonymous function), I'm expecting SharePoint to at least render a link to it when I visit the page, but I see no indication that my code is running, and in the source of the page, I see no reference to my javascript file (nor inlined content from it). I also don't see anything about my file or JSLink in ULS logs for rendering that page.

What's my next debugging step? Is there some feature I need to make sure is enabled so I can use the JSLink property? Does JSLink not work with some kinds of lists? Are there some settings on the LVWP that are incompatible with JSLink? Could I be missing a farm/webapp feature?

All the examples I can find assume that SharePoint renders that link, making me think I'm doing something incredibly stupid and simple that's breaking this.

2 Answers 2

1

This is digging up old things to reply on, but:

  • Make sure server render is not on.

  • Make sure you can reach the js file by typing the address into the address bar.

  • Make sure you use google chrome in developer mode.

0

I ran in to the same problem. I finally determined that the issue was that my .js file that I uploaded had underscores in the file name. so I would try again with the filename having no underscores. jslink file cannot have underscores

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.