WordPress.org

Forums

[resolved] RSS Imports Only Last Item (5 posts)

  1. undressmerobot
    Member
    Posted 7 years ago #

    I currently have a flat-file database I am trying to convert to WordPress, and want to import all my articles via RSS. I have tried to copy the WordPress XML format as much as possible, but have run into a wall. When importing from the XML file I created, WordPress only imports the last item. So, if I have four articles in the XML file, only the fourth is imported, even though all the articles are formatted the same.

    I have tried to import XML files with different numbers of articles, and it always only imports the last item (no matter what that item is). I have also tried comparing my XML file with the one WordPress exports, but I can't find any difference.

    My XML example file: http://www.undressmerobot.com/rss.xml

    I am importing via Import > WordPress. I also tried Import > RSS, and that worked except that the categories didn't import. (Instead, a new blank category was created for every article imported. So, five articles imported, five new blank categories.)

  2. Your feed has couple of errors in it.

    <title>Maps<br><i>We Can Create</i></title>

    Can't do that. If you have HTML in the title (which is not allowed in WordPress, BTW), then this should be inside a CDATA element. This is probably what's breaking the import. Get rid of the HTML inside the title, it's not allowed anyway.

    Grail Castle � Catalonia.

    That has a weird character in it that is not UTF8 formatted. There's more than a few of these. This probably won't stop the import though, but you should still fix it before importing.

  3. undressmerobot
    Member
    Posted 7 years ago #

    Otto42, thanks for the tip. I don't have any experience with what is allowed for in the various elements.

    Unfortunately, I took out the HTML, but it still doesn't work. (Also, when I am just importing the item with the HTML in the title, WordPress does import it, and just puts the HTML tags as regular text in the title.)

  4. Don't put <item> and </item> on the same line when using the WordPress importer. That will break it.

  5. undressmerobot
    Member
    Posted 7 years ago #

    Otto42:Don't put <item> and </item> on the same line when using the WordPress importer. That will break it.

    That worked! Thank you! This is a big help.

Topic Closed

This topic has been closed to new replies.

About this Topic