Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chad Rosenthal 272 posts 474 karma points
    Jul 27, 2010 @ 15:02
    Chad Rosenthal
    0

    Some issues importing

    I've been emailing Lee about this, but figured that I'm not the only one having the these issues, and others may have already run into that and either found the right way to do this or found work arounds.

    I'm using Umbraco 4.0.4.2 and version 1.2.1 of BlogML2Blog4Umbraco. I did an export from word and then converted the files using a command line application to BlogML.

    The issues that I'm having are:

    1. It put all of the files in the same autofolder (confirmed as an issue by Lee if you are using 4.0.4.2, but fixed if you are using 4.5)

    2. All my nodenames look like this: 'introducing-shale-country-usa'

    3. When I exported from Wordpress, I seem to have lost my paragraph tags. I check out the original .xml file and it just uses new lines. So now when I import, I get a huge block of text. Hyperlinks, unordered lists, and images are still there...just no paragraph or line breaks.

    4. The last is that the importer is timing out. I was remoting into the server, and hitting the site through Internet Explorer on the server. I had to basically go through and delete the entries that had successfully uploaded, and then try again. 

    Thanks,

    C

     

  • Chad Rosenthal 272 posts 474 karma points
    Jul 27, 2010 @ 18:29
    Chad Rosenthal
    0

    So here is what I've done so far:

    I added two fields to the blog template, mainHeader and PostDate

    1. I temporarily modified the blog4Umbraco eventHandler to post afterpublish instead of on create new. I could then create the folders based off the PostDate instead of the initial createDate.

    2. I'm keeping the nodenames the way it mentions above, but then use the mainHeader to display the title in a more friendly manor.

    3. One of our guys did a parse of the xml replacing all newlines with paragraph tags. Not ideal, but it works.

    4. Still haven't figured this out.

  • Lee 1130 posts 3088 karma points
    Jul 29, 2010 @ 09:59
    Lee
    0

    Regards number 4... Is the XML file big?  Have 100's or 1000's of posts / comments?  Mine timed out on my dev machine a couple of times, but when I put it on the main server that has some serious 'grunt' it worked fine without any timeouts.

  • Chad Rosenthal 272 posts 474 karma points
    Jul 30, 2010 @ 17:38
    Chad Rosenthal
    0

    It wasn't huge. Maybe 5000 lines. The file had data that I didn't want, so I  to parse all of the entries and then only created about 130 nodes. Once I did that, it would still time out....but would get most of the way through first.

     

  • Stijn Follet 3 posts 24 karma points
    Aug 05, 2010 @ 07:53
    Stijn Follet
    1

    Hi Chad, On number 3, you say that the paragraphs were not set 100% correctly, well, I had the same issue and after some testing the following code gives me the result that I want. In my case the problems were caused by the wysiwyg editor of the former CMS, so basically this code goes through all incorrect cases and corrects them.

                MyText = Server.HtmlEncode(MyText.ToString());

                // insert breaks and paragraphs
                MyText = MyText.ToString().Replace("  ", " ");
                MyText = MyText.ToString().Replace("\r\n", "\n");
                MyText = MyText.ToString().Replace("\r\r", "\n");
                MyText = MyText.ToString().Replace("\n\r", "\n");
                MyText = MyText.ToString().Replace("\n\n", "\n");
                MyText = MyText.ToString().Replace("\r \n", "\n");
                MyText = MyText.ToString().Replace("\r \r", "\n");
                MyText = MyText.ToString().Replace("\n \r", "\n");
                MyText = MyText.ToString().Replace("\n \n", "\n");
                MyText = MyText.ToString().Replace("\r", "<br />");
                string[] Paragraphs = MyText.ToString().Split('\n');
                MyText = string.Empty;
                foreach (string Paragraph in Paragraphs)
                {
                    MyText += "<p>" + Paragraph + "</p>";
                }

     

Please Sign in or register to post replies

Write your reply to:

Draft