I've been working on a custom item display template for a CSWP. I made a copy of Item_TwoLines and renamed the file and tags during editing in NotePad++, then saved the HTML back to ~/_catalogs/masterpage/Content Web Parts. I immediately noticed that a new .js file was not automatically created. The new template is also not available in the web part. Just last week, this worked for a different display template that I downloaded from GitHub. I've been fighting this for the past two days.
Here's what I've done so far:
- Ensured that the publishing feature is turned on at the site collection level and site level. (They were both already on)
- Triple checked that I'm using the correct site collection.
- Deleted the template, re-uploaded it, checked it in, published it, approved it. Even toggled the versioning settings for the library and repeated the process several times to no effect.
- Flushed the Object and Blob cache
- Uploaded the display template to a different site collection (which worked and created the .js file) then uploaded both to the target site collection- still not showing up in the web part.
- I verified that the same site collection and site features are turned on for both site collections.
I've run out of ideas for what to check next. I'm not a Visual Studio user, nor do I have any talent for PowerShell scripts (but I can have a dev run them). This is in an on-premises SharePoint 2013 environment that was upgraded two years ago using a database detach/reattach (shudder), so I'm guessing that may have something to do with it?