3

On the blog site template, I am trying to modify the Post content type so that it requires content in the body, a category to be chosen and the "Published" date to be hidden (they're "optional" by default). When I modify the content type, the site will not load any new posts.

  • could you please give more details, i.e include the screen shot etc. – Waqas Sarwar MVP May 19 '14 at 18:43
  • Unfortunately there isnt much to show. If I simply create a site and use the Blog site template and click "create a post" it will pop up a form. Only one of those fields are "required". Once it's filled out, it automatically posts to the page. This is fine; however, when I go to change the OOTB Post content type to make the fields required then save it and create a new post, it no longer renders the post to the thread. For some reason, simply changing the content type columns to "required" affect whether or not the post renders on the page. – Jackie May 19 '14 at 19:15
1

PublishedDate field Required property is set to True in Post content type, from another hand it's value automatically initialized while a new Post is being created.

Setting PublishedDate field property to Hidden making it's value to be set to null and this is the reason why posts with PublishedDate=NULL are not displayed in Blogs front page.

Hence you should consider another options for hiding PublishedDate field from NewForm page, below is demonstrated how to hide PublishedDate field row on the client-side:

function hidePublishedRow() {
    var fieldPublishedControl = $('[id ^=PublishedDate_][id $=DateTimeFieldTopTable]');
    var rowPublishedDate = fieldPublishedControl.closest('tr');
    rowPublishedDate.hide();
}
|improve this answer|||||
0

Not sure why it's like this but I figured out that editing the content type in SP will cause an error and my post wouldnt render. However, if I do it in SP Designer, it works fine.

Update: I can modify all of the other fields on the post but modifying the published field to either "Hidden" will keep the post from posting.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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