Support » Fixing WordPress » Bug Importing Posts : Draft Dates Are All Reset

  • arturino

    (@arturdesign2devcom)


    when i export all my posts from one WP site (v4.7.5) –> another WP ( 4.8)
    the Dates for ALL the Drafts are changed from their original created dates > to the date I import them.

    is this a bug? how do i solve this?

    thanks

    art

    • This topic was modified 4 weeks ago by  arturino. Reason: clarity
Viewing 4 replies - 1 through 4 (of 4 total)
  • @arturdesign2devcom

    Hi- are you using the WordPress native .xml import — I mean, what import utility are you using?

    If it’s the WordPress native import, it should preserve the draft date. If it’s the WordPress native .xml import, then in the .xml file, if you look at the pubdate dates of the blog post drafts in question, then do you see the (old/correct/expected) dates there?

    For example:
    <pubDate>Sun, 23 Jul 2017 20:47:57 +0000</pubDate>

    If the dates look right in the .xml file before import, then at least that will tell us that they were exported properly. If they are (new/wrong/unexpected) dates, then that would lead us to look more into something before/during export.

    Will yo write back to let us know how you go?

    • This reply was modified 3 weeks, 6 days ago by  mjassen (mjjojo). Reason: clarified expected behavior
    arturino

    (@arturdesign2devcom)

    Thanks for the tips..

    1. YES – im using the native WP xml export/import.
    2. The XML Export dates are correct.

    However they are using this <wp:post_date>tag:
    <wp:post_date><![CDATA[<strong>2017-07-12</strong> 13:15:48]]></wp:post_date>

    However the Creation date seems to be wrong : <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>

    The import date for this post ended up being: 2017-07-19

    Could this be because it asked me to re-assign the Author’s of the posts??
    Which i had to do, otherwise it would have made a new Author user or assign it to the Admin.

    Btw, the users in the new site..are exactly the same!
    yet is asked me to re-assign all of them.

    thanks

    • This reply was modified 3 weeks, 5 days ago by  arturino.
    • This reply was modified 3 weeks, 5 days ago by  arturino.

    @arturdesign2devcom

    Thank you for writing back.

    I ran some tests and created this simplistic .xml import file. When I run it, it works on my 4.8 install to create a post with the status of ‘draft’ and the ‘Last Modified’ date of: 2017/07/12.

    If you are able to run a test with this file on your site (or a dev copy of your site), then what happens?

    I’m thinking that, depending on the results of the test, it might give a clue whether it’s something about the file, vs. something about the export process, vs. something about the import process, that should be next examined.

    
    <?xml version="1.0" encoding="UTF-8" ?>
    
    <rss version="2.0"
    	xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"
    	xmlns:content="http://purl.org/rss/1.0/modules/content/"
    	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    	xmlns:dc="http://purl.org/dc/elements/1.1/"
    	xmlns:wp="http://wordpress.org/export/1.2/"
    >
    
    <channel>
    	<wp:wxr_version>1.2</wp:wxr_version>
    
    	<item>
    		<title>WP Support Test title</title>
    		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
            <dc:creator><![CDATA[mickey]]></dc:creator>
    		<content:encoded><![CDATA[WP Support Test content]]></content:encoded>
            <wp:post_date><![CDATA[2017-07-12 13:15:48]]></wp:post_date>
    		<wp:post_type><![CDATA[post]]></wp:post_type>
    	</item>
    </channel>
    </rss>
    

    Other than that, for one of the posts in question, would you be able to post here a simplified version of the <item>...</item> content from your .xml file? (So we might be able to test it by running it on a dev site to try and reproduce the symptom)

    @arturdesign2devcom

    Will you start to mark this thread as ‘Resolved’? (including some solution detail)

    Or if there’s still concern, then will you update how it is?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.