+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / invalid blog id - serious problem

invalid blog id - serious problem

14 posts, 0 answered
  1. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    04 Oct 2010
    Link to this post
    Hi,

    Recently the blog post controls stopped working on my site. Any page with a blog post control is now giving an error, and when I edit the page with the control it says "Invalid Blog ID" where the posts usually display. The installed 3.7 SP4 about a week ago, maybe thats causing it?

    Could someone please let me know how this can be fixed, as blogs are a big part of our website.

    Thanks,
    Paul
  2. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    04 Oct 2010
    Link to this post
    Hi,

    I've just discovered that it is only a problem with the "All Blogs" selection, and if "Selected Blogs Only" is selected it works fine. - So as a temporary fix I've set the pages with all blogs to selected blogs, and just checked every blog.

    Would still be nice to figure this out though.

    Thanks,
    Paul.
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    04 Oct 2010
    Link to this post
    Hello Paul,

    You have created a post inside a non existing blog. This was an issue prior Sitefinity SP4. The problem now is that after the upgrade you still have an invalid record in the database.

    You could query the database to identify the broken post

    SELECT * FROM [sf_CmsContentBase]
    WHERE Application = '/Blogs' AND ParentID NOT IN (SELECT ID FROM [sf_Blogs])


    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    06 Oct 2010
    Link to this post
    Hi Ivan,

    Thanks for the reply, I tried querying the database with the criteria you suggested but it returned no results, which is strange. Do you have any other ideas? I might try to find it manually, but it will be a long process.

    Thanks
    Paul
  5. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    06 Oct 2010
    Link to this post
    Hi Ivan,

    I just queried the database for blogs without a parent ID and found and removed the row in the database.

    However the RSS feed is still not functioning. (HAVE FIXED THIS NOW)

    Thanks,
    Paul
  6. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    07 Oct 2010
    Link to this post
    Hi Ivan,

    Also after deleting the row in the database the Blog Calendar and Post Archive have stopped working, any page with one of them gets an error and crashes the page.

    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       Telerik.Blogs.WebControls.BlogCalendar.GetPostDates() +109
       Telerik.Blogs.WebControls.BlogCalendar.BindData() +31
       Telerik.Blogs.WebControls.BlogCalendar.InitializeCalendar() +450
       Telerik.Blogs.WebControls.BlogCalendar.CreateChildControls() +36
       System.Web.UI.Control.EnsureChildControls() +87
       System.Web.UI.Control.PreRenderRecursiveInternal() +44
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
    

    Thanks,
    Paul
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    07 Oct 2010
    Link to this post
    Hi Paul,

    You have a content item - blog post which does not have a metakey "Publication_Date" or there is a content item that is presented inside sf_CmsContentBase  table but there is no relevant data inside sf_GCMetaData where we keep the metadata like - "Publication_Date"

    You can try to narrow down the issue by adding the following code in a user control which will return the id of the problematic object when the error occurs.

    var Manager = new ContentManager("Blogs");
     
    foreach (IContent content in Manager.GetContent())
    {
         
        var date = content.GetMetaData("Publication_Date"));
    }


    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Ryan
    Ryan avatar
    13 posts
    Registered:
    01 Dec 2010
    26 May 2011
    Link to this post
    I ran

    SELECT * FROM [sf_CmsContentBase]
    WHERE Application = '/Blogs' AND ParentID NOT IN (SELECT ID FROM [sf_Blogs])

    and have 11 blogs with this problem.  What do I do to fix this.  They are causing a problem when I run the search index. I'm on Sitefinity 3.7

    Thanks for you help.
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    26 May 2011
    Link to this post
    Hi Ryan,

    You need to delete /recreate these posts under a correct parent. You cannot have a post without parent. We had a bug that was fixed in Sp3 or Sp4 related to this issue - creating posts without parent.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Ryan
    Ryan avatar
    13 posts
    Registered:
    01 Dec 2010
    21 Jun 2011
    Link to this post
    I tried to delete these rows directly from the database, but then started to get an error on the Sitefiniy Admin Dashboard.  I was looking for these posts in the Sitefinity Admin > Modules > Blogs, but I'm not sure how to identify them, and I'm not even sure if they are showing up.  Our organization has many blogs, and usually published the same post on multiple blogs, so it makes it difficult to find the 11 blogs without parents.  That being said, I don't think they are showing up as posts in the modules.  What is the best way to delete these posts?
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    21 Jun 2011
    Link to this post
    Hi ,

    You need to query the database and get all post that do not have a valid parent. If the query above returns result then these are the posts you have to remove.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. Ryan
    Ryan avatar
    13 posts
    Registered:
    01 Dec 2010
    21 Jun 2011
    Link to this post
    I understand I need to remove them.  I don't understand how to remove them.  I tried to delete them from the database:

    DELETE FROM [sf_CmsContentBase]
    WHERE Application = '/Blogs' AND ParentID NOT IN (SELECT ID FROM [sf_Blogs])

    When I did this, the Dashboard started to throw errors, and since that is the first page you land on after you log into Sitefinity's Admin area, it seemed like I corrupted the application.  I then put the data back (I had saved it in excel before I deleted it), and the Dashboard returned to normal.

    I was looking to remove these using the Sitefinity Admin area, but Since the Parent ID is invalid, I don't think I can find them.  when you go to Modules>Blogs you see the blogs and since these posts parents are not valid, they are not listed here.

    I have ran the queries, I know I need to get rid of 11 posts, but I don't know how to remove them.
  13. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    23 Jun 2011
    Link to this post
    Hello Ryan,

    What are the dashboard errors you are getting? There should not be a problem ? Do you use some of the dashboard features like "show latest changes" , "show latest posts" etc?

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  14. Ryan
    Ryan avatar
    13 posts
    Registered:
    01 Dec 2010
    27 Jun 2011
    Link to this post
    I did not capture the dashboard error.

    I did submit this as a ticket, and was told to use the API to remove the posts, which worked:

    http://www.sitefinity.com/help/developer-manual/generic-content-based-blogs-posts-manage.html

    Thanks for your response.
Register for webinar
14 posts, 0 answered