3

On my blog site on Post.aspx I edited the page, to modify the view so that we can remove the comments and likes from the posts. I saved my changes and the Post web part is no longer producing the post contents.

I have also completed the same process on the default.aspx Blog page and it's just fine.

What has gone wrong?

2 Answers 2

2

To remove the Comments web part, you could have simply deleted the Comments web part from the page (Posts.aspx).

SharePoint 2013 uses client side rendering for the Post's UI. You should have probably created your own custom JSLink to override the rendering. (Recommended)

To fix what you have done, undo what you did (add back the fields in the view) and go to Posts.aspx and re-configure the view. It should come back.

An easier alternative to achieve what you're trying to do is by adding some css which would hide the unwanted fields. Add the below CSS inside content editor web part and put it inside both default and post.aspx

Here's something to start with:

    div.ms-blog-commandSpace > a {
        display: none; /* To Hide Comments */
    }
    span.ms-comm-cmdSpaceListItem > #root-likesElement-1, span.ms-comm-cmdSpaceListItem > #root-likesElement-2 {
        display: none; /* To Hide Like */
    }

    div.ms-blog-commandSpace {
        display: none; /* To Hide All Blog Command Tools (like, unlike, comment, email, edit) */
    }

    h3.ms-blog-postComments {
        display: none; /* To hide Comments header title */
    }
0

Personally I think it is a bug in SP 2013's Blog view and doesn't require you to change anything to crash.

For example, create a brand new Blog site. When it opens and you are looking at the initial sample post, click on it to open the Post.aspx?id=N page. Edit the page --> edit the Post Web Part --> Edit the Current View. Then without changing ANYTHING, just click OK.

... woalla... hosed!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.