Custom Display Templates Getting Corrupted When Uploaded through Web UI and CSOM


  • I am working on a new display template for a CSWP in SharePoint Online.  When I first uploaded the new CSWP using the upload button in the _catalogs/masterpage document library, the JS file created by Design Manager was listed as a Design File content type instead of a Display Template Code Content Type as I would have expected based on the metadata I set on the original HTML file I uploaded.  After much wrangling, I went back to first principles and tried renaming and uploading the HTML file for a display template I knew to be good (downloaded from the masterpage gallery with no modifications).  Same result.

    I have a CSOM-based provisioning app that is supposed to deploy all of our design files for us.  It too is seeing the same result.

    When I upload the same files in another tenant, they upload and are processed properly so the content of the files is not at issue.

    The only way I have been able to get these files to upload properly is if I connect with SharePoint Designer and deploy them through drag and drop into the masterpage gallery.

    I recall this being an issue in SharePoint 2013 on prem but thought a fix had been developed and deployed online since I last ran into it in July/August of 2015.  Has anyone else run into this issue?  In particular, does anyone have a reliable fix for this issue when working with SP Online?

    Friday, October 7, 2016 8:13 PM

All replies