Question

I'm pulling my hair over this problem for the last 3 hours. I have a custom control residing in the folder "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES\XXX.XXX\WorldClockPanel.ascx"

Then, in master.html i'm trying to register this control like so:

<!--CS: Start Create Snippets From Custom ASP.NET Markup Snippet-->
<!--SPM:<%@ Register Src="~/_CONTROLTEMPLATES/15/XXX.XXX/WorldClockPanel.ascx" TagPrefix="evraz" TagName="WorldClockPanel" %>-->
<!--CE: End Create Snippets From Custom ASP.NET Markup Snippet-->

I'm not even including the actual control yet for debuging purposes.

After I save the html and look at the result on the site it gives me the error:

An error occurred during translation of your HTML master page.  For more information, please navigate to the master page by clicking the preview button in the Master Page Gallery or directly typing its URL. 

The ULS gives me no clues whatsoever. I've done iisreset several times, redeployed the solution with absolutely no errors.

Please, tell me how I can fix this or at least debug it?

Was it helpful?

Solution

All I simply did to resolve the issue was navigate back to the master page through SharePoint Designer and set the seattle master page as the default master page in the properties drop menu tab, after which i got an immediate restoration and the error got resolved. I advice you restructure the source html "not the master", so that the masterpage functions appropriately with your site collection. Ensure its appropriately formatted and has necessary sharepoint markups added.

OTHER TIPS

Never mind, this was one of those weird bugs that come and go with no apparent reason. I've actually forced it to work after another hour. To pinpoint exactly what was wrong with it I compared the latest snippet that worked and the one I posted in the question and they were absolutely the same. In fact, I've copied the snippet from my question and it magically worked. Guess it was one of the internal SharePoint bugs.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top