Tip — Deploying Branding Assets (Master Pages, etc.) to SharePoint Online

Paul Galvin
1 min readSep 30, 2016

--

My team is embraced gulp in this one project as a task runner whose chief job is to deploy JavaScript and other assets up to SharePoint online.

We use gulp-spsave to do the uploading and during my first pass at this, I naively tried to upload .master and .aspx branding files this way up to /_catalogs. I’d get an error:

This file may not be moved, deleted, renamed, or otherwise edited.

More specifically, it let me upload them once, but then I’d get that error (and the longest stack traces in the world) when I tried to upload them a 2nd time.

It turns out that you don’t actually touch .master or .aspx pages since these are generated by SharePoint.

Last point on this — they are generated by SharePoint if the publishing feature is enabled. So, make sure your site collection and the site’s publishing features are enabled and only upload the associated html files and everything will work a charm.

Coda to the last point — I was getting an error when I tried to enable the publishing feature. It referenced the fact that a “publishing images library already exists.” Of course, it didn’t. I followed this ancient advice and that resolved my own issue: http://alstechtips.blogspot.com/2013/12/error-feature-failed-to-activate.html.

</end>

--

--

Paul Galvin

Author and Practice Director @ Neudesic/IBM. Father, Not-Great-But-Always-Trying Zen Buddhist. “Yet Another TypeScript Book” (https://amzn.to/2ABntAX).