1

I have been developing on a SharePoint 2013 on-premise for a few years and I've recently started on Office 365 SharePoint online. I am trying to load an html file that has javaScript into a content editor webpart but I get the following error.

Cannot retrieve the URL specified in the Content Link property. For more assistance, contact your site administrator.

Any help would be much appreciated. Thanks!

2

enter image description hereYou need to upload the HTML files and relevant JS files in a SharePoint library or in your Site asset. Copy your relative path of the HTML file(Let me know if you need help on this part) and provide the link on the content link text box and save it.

Regards, Suku

  • How do I copy the relative path of he HTML file? I right click on the file and then 'Copy Link' and then used it in the CEWP but it did not work. Any help would be much appreciated. Thanks! – OLA Apr 1 '18 at 21:34
  • The relative URL starts just after the server's URL. So something like this: /sites/demosite/yourLibrary/yourFile.html – Mike Smith - MCT - MVP Apr 2 '18 at 2:31
  • See the Image above which i uploaded. Similarly you will find an option nearby your HTML file. Then you will get your relative URL – Sukumar MS Apr 2 '18 at 13:03
  • Kindly mark it as answer if it works for you. – Sukumar MS Apr 2 '18 at 14:24
1

Where are you loading the HTML file from? It needs to be in a SharePoint library, typically Site Pages or Site Assets.

  • It's in a folder in a new document library I created. – OLA Apr 1 '18 at 3:21
0

Certainly, you are providing the wrong URL OR you should keep your file content into a text file (file must be inside SharePoint library) and provide its path in the content editor -->content link section, below that there is "Test Link" link, which should return your file. hope this helps.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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