Mindfly Website Design Studio

Mindfly Web Designer Favorite

Blog

Our Posts on Web Design

Importing BlogML.xml to BlogEngine

by Erica Quessenberry December 23, 2009 9:22 AM

I was recently given the task of upgrading Moxie Mom's blog, one of our bloggers for Neighborhood Kids, which runs on BlogEngine.Net - our studio's blog of choice seeing how we are and ASP.NET shop and it's an ASP.NET blog making it integrate quite nicely with Bloogaloo, our open source CMS. Now my blogging background is in WordPress (which is PHP), so I have to admit that I come kicking and screaming when it comes to BlogEngine. Though it's like comparing apples to oranges, or any other fruit for that matter, despite my attempt at keeping an open mind, I find I am still partial to the latter. However, I am determined to conquor and master what I don't know. That being said, while there were some things on the upgrade that I couldn't find (for example, the header tags for the "related posts" seem to live off-planet I had to style them to make them look like <h4> tags since I could not find them to make them actual <h4> tags), I did conquor the importation of posts from the old site, something that's given all of us nothing but frustrating errors for the past couple of weeks. After I figured it out, I felt kind of dumb, but I'm guessing I can't be the only one who's had this problem.

I found limited documentation online for this but lots of people who had the same problem, so I am reposting my triumph in the off chance that someone else needs it and can't find a well written explanation as well (plus if I have to do this again, I know where to go to reread the directions!). 

When I first clicked on import, FireFox, my browser of choice, tried to download an application. I thought that was odd, but went with it. However, it would not run. So I thought it was a Windows 7 compatibility issue since we've run into several of those since we've upgraded (surprise surprise). So after much frustration it finally occured to me to try it in Internet Explorer. And voila. That problem was solved.

So once that hurdle was overcome, I input all my paths to and from the data and got a username/password error. Hmm.... After a little (ok a lot) of searching online, I finally discovered the root of the problem was a date/time thing being masked by a login error. So to fix this, I went to the API folder and found the BlogImporter.asmx file. Opened it with Notepad++, found the line "post.DateCreated = import.PostDate;" (mine was around line 88) and inserted the following line under it: "post.DateModified = import.PostDate;" So your section of code should look like the following with the new line of code in it:

Post post = new Post();
post.Title = import.Title;
post.Author = import.Author;
post.DateCreated = import.PostDate;
post.DateModified = import.PostDate;
post.Content = import.Content;
post.Description = import.Description;
post.IsPublished = import.Publish;

My only gripe about it now is that it did not import the tags or the comment meta data, but I suppose since it got the bulk of it, I shouldn't complain too much... but I probably will anyway. Not super user friendly, BlogEngine! I think my bias stands... for now.

Permalink | Comments (0) | Post RSSRSS comment feed

Comments

Add comment


(Will show your Gravatar icon)  

biuquote
  • Comment
  • Preview
Loading