Title: elysdir's Replies | WordPress.org

---

# elysdir

  [  ](https://wordpress.org/support/users/elysdir/)

 *   [Profile](https://wordpress.org/support/users/elysdir/)
 *   [Topics Started](https://wordpress.org/support/users/elysdir/topics/)
 *   [Replies Created](https://wordpress.org/support/users/elysdir/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/elysdir/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/elysdir/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/elysdir/engagements/)
 *   [Favorites](https://wordpress.org/support/users/elysdir/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CSV Importer Improved] Posts being imported as drafts in newest version](https://wordpress.org/support/topic/posts-being-imported-as-drafts-in-newest-version/)
 *  [elysdir](https://wordpress.org/support/users/elysdir/)
 * (@elysdir)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/posts-being-imported-as-drafts-in-newest-version/#post-7093363)
 * I ran into this same problem. Note to plugin author: it looks to me like the 
   problem is in these lines:
 *  if (!isset($existing_id)) {
    $new_post[‘post_status’] = $opt_draft; }
 * I’m not sure *why* that’s not working correctly, but for some reason, even when
   there’s no existing ID, `post_status` doesn’t get set.
 * Because I’m not using the update-existing-posts feature right now, I worked around
   the problem by adding an extra copy of this line:
 *  $new_post[‘post_status’] = $opt_draft;
 * just below the end of the above conditional block. That works correctly. But 
   that won’t work properly for people who are using the updating-existing-posts
   feature. And the fact that the conditional is broken makes me wonder if `$existing_id`
   is getting set when it shouldn’t, or something.
 * Anyway, I’m not sure why it’s breaking, but I thought it might be useful to you
   to have a report of exactly where it’s breaking.

Viewing 1 replies (of 1 total)