Tuesday 25 April 2017

PostTitle lookup field is blank in blog site Comments list

In SharePoint 2013 OnPremise, recently we faced one strange problem with blog site Comments list. The problem was, hidden lookup field “PostTitle” in Comments list was not storing respective Post title reference after adding any comment against that Post. And hence Comments were not visible below such Posts.


When googled for this issue, we found most possible solutions as “recycling app pool”.

We tried many different solutions to resolve it but none of them helped. To name a few, we tried following solutions:

1. Checked app pool recycling. But it was already set to run on every morning.
2. Tried clearing distributed cache
3. Tried adding PostTitle field explicitly in Comments list content type (Ideally "PostTitle" field is hidden)
4. Tried repairing "PostTitle" lookup column for connecting to a Comments list again as mentioned in below thread  http://www.ilikesharepoint.de/2013/12/sharepoint-repair-lookup-columns-which-are-not-connected-to-a-list/

After long time banging the head against the issue, one of our team member have luckily observed one strange behavior during troubleshooting.

The issue was with Querystring parameter (“id”) for post.aspx url when opening any particular post. Querystring parameter “id” was in lower case.


When tried it with uppercase means making it as “ID”, the issue with comments disappeared.




The actual issue was with one Managed Property “SitePath” which was forming and returning “id” in lower case in a Post url inside a display template (for “Content By Search Webpart”).

We replaced lower case “id” with upper case “ID” in display template and uploaded it in gallery. Now the results in CBS webpart were showing Post url with upper case “ID”.

All comments after redirection from this new Post url were showing “Post Title” field correctly in the Comments list and hence those Comments (for which “Post Title” field was not empty) were visible correctly below the particular Post. J











We were not able to trace the root cause for this behavior. But it looks like SharePoint internally (while forming a query to fetch PostTitle reference) considers Querystring valid only if it is mentioned as “ID” in Post url.

I hope it will definitely save somebody’s day, week or even a month!

Happy Learning! J

1 comment:

  1. It is nice to visit your blog. I would like to ask your opinion on business and brand naming. Do you think I should seek professional naming agencies or just name my upcoming business myself? I have seen some notable brand naming firms out there and their rate is within my budget. site

    ReplyDelete