Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Blog from 4.62 example templates


I have some problems with the blog functionality based on XForm from the 4.62 examplate templates after an upgrade to CMS 5 R2.

All the comments seems to be gone...


Apr 09, 2009 8:07

Hmm that doesn't sound good. If you have old "form" handling that hasn't been upgraded to xforms all data is lost in the process when going to xforms.

But since the 4.62 templates are based on xforms I was under the impression that the data should still be there after the upgrade. Im also very intrested to getting more information regarding this.


Apr 10, 2009 7:14

Yes, the blog is using the new XForm format, but after some investigation, it seems like the Migration Tool doesn't migrate the Comment XForm data in the blog...

We really need a working migration tool soon, there are too many bugs right now!!


Apr 11, 2009 18:53

I have reported this to EPiServer. Hopefully they will add it to the buglist and fix it soon.


Apr 16, 2009 16:17

The problem is that the blog templates from EPiServer 4 does not set a page id when saving the comments, thus it's set to 0 and the migration tool happily ignores the comments.

So, what needs to be done is to run a script on the v. 4 site before migration that sets page id to something. Doesn't really matter what it's set to as the templates will still list comments by guid.

Something like this should work:

XForm xform = XForm.CreateInstance(BlogUtil.BlogCommentFormId);
IList comments = xform.GetPostedData();

foreach (XFormData comment in comments)
   comment.PageId = 1;

The BlugUtil class can be found in the blog templates folder.

Edited, Apr 24, 2009 10:30

thanks Greger. Maybe should have a sektion somwhere on world that documents stuff like this. Would be great and save time both for developers and EPiServer.



Apr 24, 2009 10:44

Yeah, definetly.

I'll send the documentation guys a note. Perhaps we could create a FAQ or a note in the migration tech note.

Apr 24, 2009 10:50
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.