Blog Posts Not Appearing

Topics: Enhanced Blog Edition
Mar 6, 2008 at 5:40 PM
Running CKS:EBE v2 (final release) on SharePoint 2007. After installing EBE, no blog posts appear - EBE shows "There are no posts in this category" This applies to entries posted both pre and post EBE. EBE's Archive statistics correctly reflect the number of actual posts, and the Tag Cloud correctly represents the actual categorization. But I cannot get any post to show. Editing an existing post via "Manage Posts" or creating a new post correctly uses EBE, but no posts appear in the default blog view

Any ideas?
Developer
Mar 6, 2008 at 5:52 PM
Its a new one on me...never heard of posts not showing before??

A few questions...I take it that it is all themes? Have you changed any settings? Can you view a post (/post.aspx?id=1)?

I would suggest turning off the MTF in the settings to see what you get and play with some of the other settings (trimming) to see what happens.

You could also get DebugView (from technet) to see if there any error messages.

--Vince
Mar 6, 2008 at 6:08 PM
Using /post.aspx?id=1 errors with "Failed to render control: Value does not fall within the expected range" but the page display EBE's Links To and Comments sections, correctly formatted

Using an id of anything other than 1 correctly displays the post
Mar 6, 2008 at 6:10 PM


RossM wrote:
Using /post.aspx?id=1 errors with "Failed to render control: Value does not fall within the expected range" but the page display EBE's Links To and Comments sections, correctly formatted

Using an id of anything other than 1 correctly displays the post


I meant to add that this behaviour occurs with all themes. The settings are out-of-the-box
Developer
Mar 6, 2008 at 6:17 PM
DebugView should give us an idea as to what is going on...if you can download it?

You can also try /_layouts/cks/ebe/settings.aspx?debug=true and re-touch he posts. You could also try editing the post with ID=1 to see if that fixes it...what's the title of that post, just wondering if it is a special character??

You could also delete (and re-create) it as it maybe that single post causing the problem...although it would be nice to see the messages from DebugView to see why this is happening??

--Vince
Mar 6, 2008 at 6:23 PM


TheKid wrote:
DebugView should give us an idea as to what is going on...if you can download it?

You can also try /_layouts/cks/ebe/settings.aspx?debug=true and re-touch he posts. You could also try editing the post with ID=1 to see if that fixes it...what's the title of that post, just wondering if it is a special character??

You could also delete (and re-create) it as it maybe that single post causing the problem...although it would be nice to see the messages from DebugView to see why this is happening??

--Vince


Many thanks for your help, Vince. I will try what you suggest and get back to you later

Ross
Mar 7, 2008 at 6:30 PM
I am having the exact same problem. As soon as I deactivate the feature for the site, the posts show up. Anyone have any ideas?
Developer
Mar 7, 2008 at 8:42 PM
Have you tried any of m suggestions?? What were the results, particulary the DebugView trace?

--Vince
Mar 8, 2008 at 5:51 PM

My apologies for the delay, Vince - I have been away from the office since my last post. I hope to get back to you on Monday.

I have now got a copy of DebugView, but haven't as yet been able to use it.

If the post ID is the same as it's permalink ID, there is no post with an ID=1 - would this explain the error?

Turning off the MFT disables EBE and the posts appear again

I hope to get back to you on Monday with the debug results

Thanks again for your help

Ross
Mar 12, 2008 at 2:04 PM
Hi Vince

I've struggled to get DebugView to display anything at all - hence this delayed reply. Even now, DebugView displays nothing when the main blog page is loaded (i.e., the page that displays the error: "There are no posts to display in this category"). Oddly, when I point the browser to a specific post, that posts loads OK, and is correctly formatted by EBE (as per my earlier message above), and DebugView does capture something. I have copied this below. I realise that this is not particularly helpful, but it is the only error I have been able to get DebugView to capture. Rather than delay getting back to you any longer, I thought I should let you know that this is as far as I can go without some more help from you

--Ross



1732 System.Threading.ThreadAbortException: Thread was being aborted.
1732 at System.Threading.Thread.AbortInternal()
1732 at System.Threading.Thread.Abort(Object stateInfo)
1732 at System.Web.HttpResponse.End()
1732 at CKS.EBE.BlogHttpModule.appPostAuthorizeRequest(Object sender, EventArgs e)
1732 Enabling Events
1732 Events enabled
1732 Showing the Categories column
1732 Updating post list
1732 Adding the themes feature
1732 System.IO.DirectoryNotFoundException: The system cannot find the path specified. (Exception from HRESULT: 0x80070003)
1732 at Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)
1732 at Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)
1732 at Microsoft.SharePoint.SPWeb.GetMetadataForUrl(String relUrl, Int32 mondoProcHint, Guid& listId, Int32& itemId, Int32& typeOfObject, Object& fileOrFolder)
1732 at Microsoft.SharePoint.SPWeb.GetListItem(String strUrl)
1732 at CKS.EBE.Linkbacks.LinkbackPinger.SendLinkbackPingsInternal(Object parameters)
1732 Setting up linkback lists
1732 Web Feature Activated
1732 System.Threading.ThreadAbortException: Thread was being aborted.
1732 at System.Threading.Thread.AbortInternal()
1732 at System.Threading.Thread.Abort(Object stateInfo)
1732 at System.Web.HttpResponse.End()
1732 at CKS.EBE.BlogHttpModule.appPostAuthorizeRequest(Object sender, EventArgs e)
Developer
Mar 12, 2008 at 3:03 PM
Ross,

You will only actually see debug messages if there is a problem. The trace statements you have posted show the Feature being activated on the web and to be honest looks very much a like a problem which was fixed a few days before release. However nothing there would explain why you are not seeing any posts in your post list.

Can I suggest you modify postlist.xsl and at the start ( just after<xsl:template match="/">) you add some text which should appear whether posts are found or not.

Do you see any of the navigation (posts per month, categories, AdminLinks) on the left? Do you see them when you look at a post?

If you look at the site in SharePoint designer, in the theme you are using what do you see...are the files there? Can you open them?

Are you using anonymous? If so does it work if you are signed in?

Can you create another (temporary) blog site below the one you are using, enable the EBE and see if that works?

It might be worth downloading the release again and running Upgrade.bat

--Vince

Mar 12, 2008 at 4:47 PM

Can I suggest you modify postlist.xsl and at the start ( just after<xsl:template match="/">) you add some text which should appear whether posts are found or not.
+++Added text as suggested. This appeared OK immediately ahead of the "no posts to display . . ." error message

Do you see any of the navigation (posts per month, categories, AdminLinks) on the left? Do you see them when you look at a post?
+++The navigation links appear, and correctly display the number of posts in each category etc. However, none of the links work - all return the same error message

If you look at the site in SharePoint designer, in the theme you are using what do you see...are the files there? Can you open them?
+++The posts do not show in SharePoint Designer

Are you using anonymous? If so does it work if you are signed in?
+++I am signed in - I'm not using anonymous

Can you create another (temporary) blog site below the one you are using, enable the EBE and see if that works?
+++EUREKA!! This works . . . but why???? And why not the site above as well??

It might be worth downloading the release again and running Upgrade.bat
+++Will do so, but haven't done so yet. I thought I'd await your response to my reply above regarding the new sub-site


--Ross
Developer
Mar 12, 2008 at 5:10 PM
Ross,

Where you added the text in the XSL can you replace the content of <xsl:template match="/">...</xsl:template> with

<xsl:template match="/">
<xmp><xsl:copy-of select="."/></xmp>
</xsl:template>

You should then get the XML in the response (probably need to view source). Could you email it to me? vince(a)thekid.me.uk (or post it here if you don't mind?)

Does the nav show the correct number of posts in the Months? You say the links work...they take you to the correct page, but no posts are displayed?

--Vince
Mar 12, 2008 at 7:17 PM
Edited Mar 12, 2008 at 7:17 PM

1. Modified postlist and its response has been emailed to you

2. Yes, the nav does show the correct number of posts in the Months. The links appear to work - e.g., selecting the link for December 2007 (which correctly indicates that there should be two posts), takes me to http://staff.vantisplc.com/mysite/rpm/Blog/archive/2007/12.aspx, which looks right, although the page displays with the "no posts to display" error.

Hope this helps

--Ross
Developer
Mar 12, 2008 at 8:11 PM
Ross,

Have you modified the 'Posts' list in anyway? Specifically have you removed any of the columns?

The query which locates the posts looks for the following columns...

Body, NumComments, PublishedDate, PostCategory, FileDirRef, BlogTitleForUrl, CategoriesAsText, NumLinkbacks

These are the internal names and if you have changes/removed any then the query may not return any results...

This is my first guess as everything else looks OK, you just are not getting any results from the Query...I'll carry on looking.

--Vince
Mar 12, 2008 at 8:36 PM

Vince

No, we have made no modifications at all - our install is straight out of the box. As is the subsite blog which works OK. We are, though, running SP1, but I wouldn't have thought that would make any difference.

--Ross
Mar 12, 2008 at 9:06 PM

Vince

Where can I confirm what columns we have? Does the following URL do this?
http://staff.vantisplc.com/mysite/rpm/Blog/_layouts/ViewEdit.aspx?List=%7B3703582F%2D86BC%2D4AF0%2DA12D%2DB6515463F748%7D&View=%7B12E11C5B%2DCFA2%2D43EF%2D9345%2DF78D79230D5C%7D&Source=http%253A%252F%252Fstaff%252Evantisplc%252Ecom%252Fmysite%252Frpm%252FBlog%252FLists%252FPosts%252FAllPosts%252Easpx

Ross
Developer
Mar 12, 2008 at 9:25 PM
Ross,

http://staff.vantisplc.com/mysite/rpm/Blog/Lists/Posts/AllPosts.aspx

Then select Settings->List Settings

The columns should be visible there.

--Vince
Mar 12, 2008 at 9:44 PM
Edited Mar 12, 2008 at 9:45 PM
The columns shown there are (as displayed):

Title
Body
'#' Comments
Published
BlogTitleForUrl
Categories
'#' Linkbacks
Trackback ping URLs
Created By
Modifed By

It looks as if your PostCategory and FileDirRef are missing. But if so, why? And why are they not (or rather, I assume they are not) also missing from the sub-site-blog (which I cannot now access from here tonight)?

Hope this helps

--Ross
Developer
Mar 12, 2008 at 10:04 PM
Ross,

I think that list is OK, some may be hidden.

The names you see are the display names, not the internal names. Could you hover over each one and look at the URL in the Status Bar. In the URL you should see a query string parameter call Field and will probably be at the end of the URL. Could you check what each of these are?

Sometimes SharePoint can get it's Field names mixed up and you may find that whilst Categories is perfectly correct, for some reason WSS has given it an internal name of Categories1??

For more info check this out...More on WSS columns & internal field names

--Vince
Mar 12, 2008 at 10:21 PM
Tiltle = Title
Body = Body
'#' Comments =NumComments
Published = PublishedDate
BlogTitleForUrl = BlogTitleForUrl
Categories = Categories
'#' Linkbacks = NumLinkbacks
Trackback ping URLs = ManualTrackbackPing
Ceated By = Author
Modifed By = Editor

--Ross
Mar 13, 2008 at 8:41 AM
Hi Vince

Now that I am back in my office, I just want to clarify one of my earlier posts

1. My default Blog is at http://staff.vantisplc.com/mysite/rpm/Blog/default.aspx

2. At your request, I created a new Blog as a subsite of my default Blog - http://staff.vantisplc.com/mysite/rpm/Blog/SubBlog/default.aspx

3. SubBlog inherits its parent's permissions

4. Apart from activating CKS:EBE no other config changes were made to either Blog or SubBlog

5. SubBlog's columns appear to be IDENTICAL to those of its parent's

6. CKS:EBE works perfectly on SubBlog

Hope this helps

--Ross
Developer
Mar 13, 2008 at 9:56 AM
Ross,

We need to work ut why the query is not returning any results. Generally this is because one of the ViewFields specified does not exist in the list.

Can you modify Home.aspx using SharePoint designer, by adding the following control before the <EBE:PostList ...

	<EBE:SingleListQuery runat="server" Transform-XslName="PostList.xsl" ListName="Posts"
        ViewFieldsXML="<FieldRef Name='Title' Nullable='TRUE'/><FieldRef Name='ID' Nullable='TRUE'/><FieldRef Name='Author' Nullable='TRUE'/><FieldRef Name='Body' Nullable='TRUE'/><FieldRef Name='NumComments' Nullable='TRUE'/><FieldRef Name='PublishedDate' Nullable='TRUE'/><FieldRef Name='PostCategory' Nullable='TRUE'/><FieldRef Name='FileDirRef' Nullable='TRUE'/><FieldRef Name='BlogTitleForUrl' Nullable='TRUE'/><FieldRef Name='CategoriesAsText' Nullable='True' /><FieldRef Name='NumLinkbacks' Nullable='TRUE'/>"
        QueryXML="<OrderBy><FieldRef Name='PublishedDate' Ascending='FALSE'/></OrderBy>" />

This should perform exactly the same query and return the same results.

If you don't get any results, can you try this cut down version...

	<EBE:SingleListQuery runat="server" Transform-XslName="PostList.xsl" ListName="Posts"
        ViewFieldsXML="<FieldRef Name='Title' Nullable='TRUE'/><FieldRef Name='ID' Nullable='TRUE'/>"
        QueryXML="" />

Thanks, Vince
Mar 13, 2008 at 3:43 PM
Some progress.

1. Copying your first bit of code to Home.aspx displays all posts at http://staff.vantisplc.com/mysite/rpm/Blog/default.aspx
However, clicking on Archives or the Tag Cloud produce the old error.

2. I then spent some time checking through EBE’s handling of Categories, and I wonder if this is where the problem lies.

3. On my SubBlog (where EBE *appears” to work OK), I note that post categories do not show in the “Category” column at http://staff.vantisplc.com/mysite/rpm/Blog/SubBlog/Lists/Posts/AllPosts.aspx as accessed from EBE’s “Manage Posts” link. This seemed odd

4. I then returned to my main blog and disabled EBE. With EBE disabled, I edited an existing post. The SharePoint edit UI now displays TWO “category” fields: one called “Category” (the original SharePoint field), and one called “Categories” (the field added by EBE).

5. It seems that on activation, EBE hides the original “Category” field, and replaces it with its own “Categories” field, configured to allow multiple categories. And although I have not yet been able to definitively pinpoint the problem, it looks as if EBE gets muddled between the two fields. For instance, the AllPosts view (see point 3 above) only displays values from the old “Category” field, even though EBE holds its data in “Categories”

6. We had already configured the original “Category” field for multiple categories before we installed EBE. Does this explain the problem?

7. Since writing the above, I have created a new sub-sub-blog, which replicates the problem using the following steps:

a. Create new blog site
b. Configure “Category” field in AllPosts view to allow multiple values
c. Add a new post and assign it the default Category1 and Category2
d. Enable the CKS:EBE feature
e. Returning to the blog home page displays our old error message

I hope this gives you something to work with

--Ross
Developer
Mar 13, 2008 at 4:16 PM
Ross,

I would definitely say that modifying the existing Category field was the problem. The EBE assumes this is still a text field and performs queries based on that fact.

We hide the original one and copy the values from it into the new one...this allows us to restore it if and when the feature is de-ativated.

If you can restore it to a simple LookupField (probably not) then great, otherwise it will need deleting and re-creating.

The Month & Categories page won't work unless we can get the <EBE:Posts /> control to find the posts.

--Vnce
Developer
Mar 13, 2008 at 5:24 PM
Ross,

The other thing to try is to keep the code in Home.aspx and gradually remove the Nullable='True' from the ViewFieldsXml property, one at a time for each field. After you remove it try again and see if you get any results.

Keep doing this until you don't see any results and try for each field. This will identify the problematic field(s).

--Vince
Mar 13, 2008 at 6:22 PM
Vince

This is the only one that is required: <FieldRef Name='PostCategory' Nullable='True' />. No surprises there.

I'm hoping that there is a coding workaround, as your earlier suggestions regarding the Category field have not worked.

As you indicated was likely, restoring Category to a simple LookupField did not work.

Deleting Category was easy, but recreating it is a nightmare. I am unable to recreate a Category column from scratch, as it is a "special" column already in use. Taking the option to create from another column gives me a simple text column called Category, but the SharPoint UI doesn't allow me to configure that column as a simple LookupField, and EBE fails on reactivation.

Any ideas, or are you thinking that there is a coding solution? I'm certainly hoping that there is, as fiddlilng with the Category column, even if it had worked, is very messy indeed

--Ross

Developer
Mar 17, 2008 at 10:32 AM
Ross,

I have re-created your problem with the Category column. I have also confirmed that the fix I sent you works for month & main post lists.

However, mine also works for the categories whereas yours does not? I am not sure what is causing this?

If you are re-adding the Category column you need to name it PostCategory as this is the 'Internal Name' of the column (Category is just the display name). Once you have created it with the internal name you can then change the display name after (although not back to Category)...the display name should not affect anything.

This should allow you to restore the column as it was originally defined.

--Vince


Mar 17, 2008 at 6:48 PM


TheKid wrote:

However, mine also works for the categories whereas yours does not? I am not sure what is causing this?


Although I need to look at this a bit more, I believe that it is only those Categories entered pre-EBE (i.e., those using the Category field) that are not appearing (which, I guess, is not unexpected). I will check this out tomorrow

--Ross
Developer
Mar 17, 2008 at 11:14 PM
That doesn't surprise me. The EBE copies the existing categories, but expects a single value lookup, not a multi value one.

--Vince
May 15, 2008 at 6:05 AM
Hi,

I would like to add the Author to the PostList.xsl (below the Tagged as) - How do I archieve this?

Thanks

Alex
May 22, 2008 at 3:29 AM
I am running the exact same issue. I read the entire thread. Creating a new blow and enabling EBE works fine but if I try to enable EBE on an existing blog with currnet posts, I always get "no posts" 

I tried replacing <EBE:PostList with
<EBE:SingleListQuery runat="server" Transform-XslName="PostList.xsl" ListName="Posts"
        ViewFieldsXML="<FieldRef Name='Title' Nullable='TRUE'/><FieldRef Name='ID' Nullable='TRUE'/><FieldRef Name='Author' Nullable='TRUE'/><FieldRef Name='Body' Nullable='TRUE'/><FieldRef Name='NumComments' Nullable='TRUE'/><FieldRef Name='PublishedDate' Nullable='TRUE'/><FieldRef Name='PostCategory' Nullable='TRUE'/><FieldRef Name='FileDirRef' Nullable='TRUE'/><FieldRef Name='BlogTitleForUrl' Nullable='TRUE'/><FieldRef Name='CategoriesAsText' Nullable='True' /><FieldRef Name='NumLinkbacks' Nullable='TRUE'/>"
        QueryXML="<OrderBy><FieldRef Name='PublishedDate' Ascending='FALSE'/></OrderBy>" />

This works but it does not seem to work for the categories and pages view by month.

Any suggestions, I would like to avoid having to manually copy posts from one blog to another one

My blog is located at 

http://www.portalsolutions.net/Blog/default.aspx