tavikukko / Chrome-SP-Editor

Extension for creating and updating files (js, css) in SharePoint Online from Developer Tools
122 stars 39 forks source link

Adding a sitecollection css scriptlink causing the page to reload one more time (SP2013) #44

Open jeffangama opened 6 years ago

jeffangama commented 6 years ago

Hi !

Thanks again for your work, I've found an issue : when i add a css as script link, site collection level, the page reload a second time before displaying the css. Even an empty CSS file content causes this.

This is on Classic UI on SharePoint 2013 on premise.

As a workaround ive enabled publishing infrastructure on the site collection and referenced the css via the Master Page page (../_layouts/15/ChangeSiteMasterPage.aspx)

The added url is : ~sitecollection/Style library/mis.customDesign.css Sequence 2

Nothing blocking since i've a workaround !

Thank you !

tavikukko commented 6 years ago

Hi, could it be that teamsite with MDS enabled is causing this? If so, you could also disable MDS and no need to customize masterpage?

jeffangama commented 6 years ago

It's already disabled (site feature level)

tavikukko commented 6 years ago

ok, the css is injected using scriptblock, which is block of js code that injects the css to html head. Don't know if there is a way to go around this, maybe I should use RegisterModuleInit to handle the issue.