• Really Simple CSV Importerを重宝させて頂いております。

    上書きについて質問させて頂きます。

    大量に上書きをして更新しようと、
    ひとまず、1ページをテストアップしようとしました。

    下記のようにcsvを作成致しました。
    ———————————————————————————–
    “post_id”,”post_date”,”post_type”,”post_status”,”post_title”,”post_content”,”post_category”,”post_tags”,”custom_field”
    “2023”,”2015/04/10 1:00:00″,”post”,””,”タイトル”,”テキスト”,”カテゴリー”,”タグ”,”this is custom field value.”
    ———————————————————————————–
    ■結果
    上書きされず、新規のページが作成されました。
    ちなみにpost_idは【】内を挿入しています。
    /post.php?post=【2023】&action=edit

    なので、
    ツール→インポート→csvよりodsで編集→csv I/Oでutf-8保存
    ———————————————————————————-
    “post_id”,”post_name”,”post_author”,”post_date”,”post_type”,”post_status”,”post_title”,”post_content”,”post_category”,”post_tags”,”custom_field”
    “2023”,”Import-test”,””,”2013/09/13″,”post”,”publish”,”CSV Import Test”,”This is a post for csv import.
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”,”fruits”,”apple,banana”,”this is custom field value.”
    ———————————————————————————–
    変更箇所
    ・2.3行目を削除し、1行目のみを編集
    ・idを変更
    ・authorを空欄

    結果:やはり上書き保存できず、新規登録されました。

    何か原因はございますか?
    *新規登録は行えます。

    Word Press Ver.4.3.1

    何卒、ご解答よろしくお願い致します。

4件の返信を表示中 - 1 - 4件目 (全4件中)
  • こちらのデバッグ用プラグインをインストールした状態で再度インポートを試し、表示された内容を貼り付けてください。

    https://gist.github.com/hissy/7175656

    ※デバッグプラグインの有効化中は、インポートが行われずブロックされ、画面に表示されるのみになります。

    トピック投稿者 buuuu-chan

    (@buuuu-chan)

    ご返答ありがとうございます。

    さっそくですが、表示された内容は下記です。
    *途中、<!–HTML表示–>部分に、「post_content」に入れたHTMLの内容が記載されました。

    $is_update:

    bool(false)

    $post:

    array(6) {
    [“post_type”]=>
    string(4) “post”
    [“post_date”]=>
    string(19) “2015-11-19 22:15:06”
    [“post_status”]=>
    string(7) “publish”
    [“post_title”]=>
    string(51) “北海道内で唯一の日本式城郭、松前城”
    [“post_content”]=>
    string(4255) “

    <–HTML表示–>


    [“post_category”]=>
    array(1) {
    [0]=>
    string(2) “21”
    }
    }

    $meta:

    array(2) {
    [“”ID””]=>
    string(3) “583”
    [“custom_field”]=>
    string(27) “this is custom field value.”
    }

    $tax:

    array(0) {
    }

    ■サンプルで試した場合↓でした。

    $is_update:

    bool(false)

    $post:

    array(8) {
    [“post_type”]=>
    string(4) “post”
    [“post_name”]=>
    string(11) “Import-test”
    [“post_date”]=>
    string(19) “2013-09-13 00:00:00”
    [“post_status”]=>
    string(7) “publish”
    [“post_title”]=>
    string(15) “CSV Import Test”
    [“post_content”]=>
    string(477) “This is a post for csv import.
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”
    [“post_category”]=>
    array(1) {
    [0]=>
    string(2) “78”
    }
    [“post_tags”]=>
    string(12) “apple,banana”
    }

    $meta:

    array(2) {
    [“”post_id””]=>
    string(4) “2983”
    [“custom_field”]=>
    string(27) “this is custom field value.”
    }

    $tax:

    array(0) {
    }

    何卒、よろしくお願い致します。

    トピック投稿者 buuuu-chan

    (@buuuu-chan)

    タグを貼付けましたが、その後どうなったのでしょうか?

    post_idが2023のpost_typeはpostですか?
    csvのpost_typeの値を空欄にしたらどうなりますか?

4件の返信を表示中 - 1 - 4件目 (全4件中)
  • トピック「Really Simple CSV Importer 上書きの仕方について」には新たに返信することはできません。