locked
Moving Blog posts from one sub-site to a different sub-site RRS feed

  • Question

  • My SP portal structure is as follows.

    MainSite  - Sub SiteA (SiteA blog posts)- Sub SiteB(SiteB blog posts) - Sub SiteC(SiteC blog posts)- Sub SiteD.

    Now I want to move tha blog posts of all the sub sites to Sub-siteD.

    I was thinking of creating an event handler, but I am struck at What item should be the event source? step for blog posts.

    Also when I try to create a workflow for blogs site it throws an error "Cannot connect to sharepoint site. The url is in-valid".

    Thanks for your help in advance.

                                      

    Monday, July 16, 2012 3:06 PM

Answers

  • Hi  Suma,

    The blog posts /comments will be under 

    1. Lists/Posts
    2. Lists/comments

    to move the blog posts you should read from the above Lists in all source sub-sites and create entries on the target site with the same data , then delete or mark the already copied posts in the source sub-sites

    you can implement this as a timer job to migrate the data from source sites to the target site , after migration is done and you decide to remove old site blogs /or archive them you can deactivate your feature /remove the newly created timer job

    Hope that helps

     

    • Proposed as answer by Amr FouadMVP Thursday, July 26, 2012 3:29 AM
    • Marked as answer by Qiao Wei Sunday, July 29, 2012 12:17 PM
    Wednesday, July 25, 2012 9:19 PM
  • Hi Suma,

    As ministainer provided, the blog posts/comments are under lists/Posts and lists/comments, you can get them through All Site Content page from UI. You can choose to first move all the existing items, then use event receiver on the list. Or consider timer job which also a workaround for it.

    Thanks,


    Qiao Wei

    TechNet Community Support

    • Marked as answer by Qiao Wei Sunday, July 29, 2012 12:17 PM
    Thursday, July 26, 2012 1:58 AM
  • Hi Suma,

    Posts and Comments in SharePoint blog site are also lists, to move items in them to sub site, you can use Site Content and Structure, (Site Actions->Site Settings->Site Content and Structure), then choose the list items you want to move, select Actions->Move in the tool bar, the selected items can be moved to the specific location.

    Also, you can use SharePoint API for list to move the list items, just create a Console application will be OK. After doing this, if users add items in sub siteA, sub siteB, and you want to move items automatically, you can create event receiver for the list. Use ItemAdded event to operate the new added item.

    More information, How to: Add or Delete List Items:
    http://msdn.microsoft.com/en-us/library/ms467435.aspx

    Thanks,


    Qiao Wei

    TechNet Community Support

    • Marked as answer by Qiao Wei Sunday, July 29, 2012 12:17 PM
    Tuesday, July 17, 2012 8:10 AM
  • Thanks for all the posts. The answer I was looing for is to attach an event handler to the blog post, ListTemplateId in <Receivers> tag in Elements.xml file should be set to "301".

    Also refer to http://bramhasani.blogspot.com/2012/04/howto-create-event-handler-for.html

    • Marked as answer by Suma Chandu Monday, September 17, 2012 5:30 PM
    Monday, September 17, 2012 5:30 PM

All replies

  • Hi Suma,

    Posts and Comments in SharePoint blog site are also lists, to move items in them to sub site, you can use Site Content and Structure, (Site Actions->Site Settings->Site Content and Structure), then choose the list items you want to move, select Actions->Move in the tool bar, the selected items can be moved to the specific location.

    Also, you can use SharePoint API for list to move the list items, just create a Console application will be OK. After doing this, if users add items in sub siteA, sub siteB, and you want to move items automatically, you can create event receiver for the list. Use ItemAdded event to operate the new added item.

    More information, How to: Add or Delete List Items:
    http://msdn.microsoft.com/en-us/library/ms467435.aspx

    Thanks,


    Qiao Wei

    TechNet Community Support

    • Marked as answer by Qiao Wei Sunday, July 29, 2012 12:17 PM
    Tuesday, July 17, 2012 8:10 AM
  • Thanks for your reply Qiao Wei. I actually intend to move the blog posts automatically. And to create an event handler, what would be the Event source? i.e. what type of list/library does blog posts come under?
    Wednesday, July 25, 2012 7:12 PM
  • Hi  Suma,

    The blog posts /comments will be under 

    1. Lists/Posts
    2. Lists/comments

    to move the blog posts you should read from the above Lists in all source sub-sites and create entries on the target site with the same data , then delete or mark the already copied posts in the source sub-sites

    you can implement this as a timer job to migrate the data from source sites to the target site , after migration is done and you decide to remove old site blogs /or archive them you can deactivate your feature /remove the newly created timer job

    Hope that helps

     

    • Proposed as answer by Amr FouadMVP Thursday, July 26, 2012 3:29 AM
    • Marked as answer by Qiao Wei Sunday, July 29, 2012 12:17 PM
    Wednesday, July 25, 2012 9:19 PM
  • Hi Suma,

    As ministainer provided, the blog posts/comments are under lists/Posts and lists/comments, you can get them through All Site Content page from UI. You can choose to first move all the existing items, then use event receiver on the list. Or consider timer job which also a workaround for it.

    Thanks,


    Qiao Wei

    TechNet Community Support

    • Marked as answer by Qiao Wei Sunday, July 29, 2012 12:17 PM
    Thursday, July 26, 2012 1:58 AM
  • Thanks for all the posts. The answer I was looing for is to attach an event handler to the blog post, ListTemplateId in <Receivers> tag in Elements.xml file should be set to "301".

    Also refer to http://bramhasani.blogspot.com/2012/04/howto-create-event-handler-for.html

    • Marked as answer by Suma Chandu Monday, September 17, 2012 5:30 PM
    Monday, September 17, 2012 5:30 PM