WordPress.org

Ready to get started?Download WordPress

Forums

Blogger Importer
[resolved] Blogger Draft status changed to Published in WP (7 posts)

  1. RonStrilaeff
    Member
    Posted 2 years ago #

    Version 0.5 of Blogger Importer imported all my blogspot posts successfully, however all of the blogspot posts that were in draft mode became "published" in WP.

    Am I missing a setting somewhere in either blogger or WP or is this a bug in the plugin? For example: is the syntax of line 720 of blogger-importer.php correct? ...what is the meaning of a single vertical bar in the if statement containing "$entry->isDraft" ?

    This is a duplicate of the general post here (I forgot that there was a topic submission form at the bottom of the plugin's support page):
    http://wordpress.org/support/topic/blogger-importer-changes-status-to-published?replies=1

    Thanks, Ron

    http://wordpress.org/extend/plugins/blogger-importer/

  2. RonStrilaeff
    Member
    Posted 2 years ago #

    Well, this is a real issue since if all the drafts got published they would get broadcast to the rss readers. So my workaround will be to "schedule" the blogger draft posts for some distant future date in blogspot before importing to WP. This plugin preserves that scheduled status but not the draft status. Then after the import, I will edit each scheduled post in WP and changed them back to draft.

  3. Workshopshed
    Member
    Plugin Author

    Posted 2 years ago #

    Ron,
    to answer your question, yes the syntax on 720 is correct, the vertical bar is a logical OR.
    The problem is that the function isDraft was always returning a false. This in turn was due to an incorrect schema used for parsing that bit of the XML passed by blogger.

    So in summary, the fix is...

    Open the file "blogger-importer-blogitem.php" and change the line

    from
    define('SIMPLEPIE_NAMESPACE_ATOMPUB', 'http://www.w3.org/2007/app');
    to
    define('SIMPLEPIE_NAMESPACE_ATOMPUB', 'http://purl.org/atom/app#');

    N.B. the # is important so make sure you copy the whole string.

    I've created a ticket for this http://core.trac.wordpress.org/ticket/21023

  4. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    Fixed in trunk for version 0.6. Development version of the code can be found here:
    http://wordpress.org/extend/plugins/blogger-importer/developers/

  5. RonStrilaeff
    Member
    Posted 2 years ago #

    Great, that took care of it: my test shows that Published, Scheduled AND Draft status all come across intact ... thanks!

    But about that single vertical bar...this reference show it as a bitwise inclusive OR operator where the result is an integer with bits set if either of the two operands have the corresponding bit set.
    http://php.net/manual/en/language.operators.bitwise.php

    The desired result (true or false) may actually work in this case, however, I think that line 720 should have the double vertical bar to match the logical "OR" intended. I'm not a PHP guru by a long shot since I cut my programmer teeth on Pascal/Delphi which is a strongly typed language, so the looseness of C , javascript, and PHP kinda creeps me out. 8-/

  6. Workshopshed
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, you are correct, that should be a double || not a single. It will work with bitwise OR but it should be changed so it's more logical to read.

  7. patsy@patsysponderings.com
    Member
    Posted 1 year ago #

    I cannot find this line of code in the current version of the plug in. Other notes say this problem has been fixed, but it is publishing my drafts after I import as of 2/17/2013. Suggestions?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic