• Resolved wvpv

    (@wvpv)


    Based on my testing, this plugin duplicates pages instead of updating them when the permalink is the same. Can’t really use it for my page-based scenario, unfortunately.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author vaakash

    (@vaakash)

    Hi @wvpv,

    Sorry for the super late reply.

    Ideally the *posts* will not be duplicated.

    Ideally the plugin checks for the “post slug” and the “file name” of the markdown file.

    If there is no such slug already existing under the parent post then a new post will be created.

    If you are still using the plugin, you could share more details if the issue is still reoccuring.

    Thanks,
    Aakash

    Thread Starter wvpv

    (@wvpv)

    I’m not currently using it because it duplicates pages instead of updating pages matching slugs. I don’t get the use case for this option if it doesn’t update.

    View post on imgur.com

    I’d like to create pages like chapters in a book.

    Plugin Author vaakash

    (@vaakash)

    Hi,

    Posts/pages will never be duplicated. Unless there some special scenario which I didn’t cover.

    I would suggest you to give another try. It should not happen.

    My website uses the plugin and I had no issues like duplicate posts and I have tested it multiple times in different post types.

    It would be helpful if you can retry and share a screenshot of your repo configuration in the admin page whenever possible.

    Thanks,
    Aakash

    in “publisher.php” file,
    when “create_posts” function executed, $item_slug need to encode with percent encoding before check the array_key_exists in $existing_posts.

    Maybe He also used non-English characters in the file name.

    in my case, i just fix it with like this (on line 233):

    $encoded_item_slug = strtolower(urlencode(str_replace(" ","-", $item_slug)));
    $post_id = array_key_exists( $encoded_item_slug, $existing_posts ) ? $existing_posts[ $encoded_item_slug ][ 'id' ] : 0;
    • This reply was modified 3 years, 4 months ago by imjlk.
    Plugin Author vaakash

    (@vaakash)

    Hi @imjlk,

    Thanks for looking into this.
    I haven’t tested with markdown files with non-english characters.

    I’ll check it out and test your suggestion.

    Thanks,
    Aakash

    Plugin Author vaakash

    (@vaakash)

    My apologizes for the late fix. This issue is fixed in v1.4. Please do update to it and let me know if we are good.

    Thread Starter wvpv

    (@wvpv)

    Working good now with my page content. Thank you!

    Plugin Author vaakash

    (@vaakash)

    Thanks for confirming !

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Duplicating pages instead of updating’ is closed to new replies.