Script stopped working on Sharepoint

Asked

Viewed 197 times

1

I have a problem that I believe to be very unusual, within Sharepoint Online in the folder Site Pages I created a new and called Dashboard. In the Dashboard insert a webpart of content and put an html code and a call to a load a script that is in another folder on the same site.

The html works normal and when it is in page editing mode the script works, but when I leave it doesn’t work anymore. I’ve looked everywhere and I can’t find the reason, some help?

  • Check the code served by the page when it is not in edit mode. Is the Javascript code there? The reference (the path) is correct?

  • Yes the reference is correct. So much so that it works when in edit mode, it executes my calls and returns the content.

  • And out of edit mode?

  • Outside when I click the button where he should press the function nothing happens. Already I even gave check-out and check-in on main.js to see if it could be something from the file but it did not help.

  • Let me ask you another way... When it’s not in edit mode, is the script present on the page? It does not trigger any type of error on the console?

  • No. The script is in a . js file within Site Assets and I call it in html. It still worked normal without editing but is now no longer working again. On the console no error.

Show 1 more comment

1 answer

3

Well after doing so I discovered that my problem was in relation to a Sharepoint resource called "Minimal Download Strategy" that redirects the url I’m using to another one to optimize execution. What I had to do at the end was simple, just get into:

Site Settings > Manage Site Resources > Minimum Download Strategy (Disable).

This made it possible for the script to run normally. More information on the link below where I discovered the solution:

http://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/improve-page-load-times-using-minimal-download-strategy-HA103692072.aspx

Browser other questions tagged

You are not signed in. Login or sign up in order to post.