• Resolved lukas kotyza

    (@lukas-kotyza)


    Hello, I have been importing few wp comments from old site to new site. But only half of the comments have been imported. The rest gets error message: Post doesn’t exist. I have check the comment_post_ID in my csv file and it is correctly matching post ID on the new site. I am not sure what could be wrong if IDs are correct and also the fact that other half of the comments were imported successfully.

    As an example, I am including a link to a post (postid-2583). In my csv file comment_post_ID = 2583.

    Please could you give me some hint or what can I try to solve this issue?
    Thank you very much

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @lukas-kotyza,

    Could you please share the CSV file with which you are importing so that we can check it. You may please share it with us by uploading to Google Drive or any similar service and sharing the link. Or else you may please send it to us via support.

    Thread Starter lukas kotyza

    (@lukas-kotyza)

    Hello,
    Thank you very much for your fast response. I have send you the CSV file via support. Thank you very much

    This plugin appears to only support comments for Posts and Products. Attempting to import Page comments will fail with the “This post doesn’t exist” error.

    This restriction can be removed by editing the /plugins/comments-import-export-woocommerce/includes/importer/class-hf_cmt_impexpcsv-import.php file on line 658, in the product_id_not_exists() function. Change the SQL query from:

    $query = "SELECT ID FROM $wpdb->posts WHERE ID = %d AND post_type='post'";

    to:

    $query = "SELECT ID FROM $wpdb->posts WHERE ID = %d"; (or change ‘post’ to ‘page’ above if you want to explicitly only search Pages)

    After making this change and saving the file, importing comments for Pages now works as expected.

    • This reply was modified 3 years, 10 months ago by primathon.
    • This reply was modified 3 years, 10 months ago by primathon.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘“The post doesn’t exist” error shows even when the ID exist’ is closed to new replies.