Today again met with a strange exception with the Friendly URL. Thought of sharing the same to the Community.
I have a Term Driven Navigation and with the Friendly URLs configured for every terms.
I guess in the previous articles, we saw about these implementations in detail.
By looking at the setup, all looks good.
When I try navigating to the customized URL, it goes properly to my .aspx page.
But, when we again reload the same page with any parameters, i.e., the Terms, I was getting a strange exception like,
Though in SharePoint, this screen is a Common one, the next immediate step would be, we will look into the ULS Logs.
Then on the ULS Log, I got the exception message like,
System.Web.HttpException: Cannot find ContentPlaceHolder ‘PlaceHolderPageTitleInTitleArea’ in the master page ‘/SC/_catalogs/masterpage/mymaster.master’, verify content control’s ContentPlaceHolderID attribute in the content page.
at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
My master page works fine for all other pages. Even for the same page, without any query string parameters it works fine.
This looks really strange now. After modifying the Master Pages many times, nothing helped me.
The fix for this is a very simple one, which I made the mistake. We need to choose the Catalog Item Page Settings as well, if we want to load the same page with parameters.
Sometimes, SharePoint throws a vague exception message which we are not able to understand directly.