• Resolved jamesryancooper

    (@jamesryancooper)


    When I add the recipe shortcode to a post, anytime the URL of the post is visited, a duplicate of the post is being created in the WordPress database and therefore showing up in the post feed on the website and in the post list in the admin. I ended up with over 100 duplicates in the database before I could figure out that it was being caused by this plugin. Once I removed the shortcode the duplication stopped. I added the shortcode once more just to verify and the duplication started again.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter jamesryancooper

    (@jamesryancooper)

    6 days and still no reply? This is a big issue and I cannot use the plugin until this is resolved.

    In my installation this problem does not show up. I also use the shortcode with blog posts, but I do not get any duplicate posts.

    Plugin Author Boxy Studio

    (@boxystudio)

    Similar to @kochenistjazz, I’m not seeing this issue either at all and I cannot replicate the problem.

    @jamesryancooper, is this still happening? What if you disable all of the other plugins and switch the theme to something default like TwentySeventeen? Does it still happen?

    Thread Starter jamesryancooper

    (@jamesryancooper)

    @boxystudio I have had this happen to me twice and I was able to eliminate the duplication by removing the Cooked shortcode from the post. I have since deactivated the plugin. I will try reactivating the plugin this week and test again. I will report back if I have the issue happen again after reactivating.

    Plugin Author Boxy Studio

    (@boxystudio)

    @jamesryancooper: Okay thanks for looking into it again. Which shortcode exactly is causing the issue? Are you adding the [cooked-recipe] shortcode to a blog post or are you talking about the actual recipe post that is created.

    Thanks for the clarification!

    Thread Starter jamesryancooper

    (@jamesryancooper)

    I have the issue when adding the [cooked-recipe] shortcode to a post. I did reactivate the plugin and insert the generated shortcode into a new recipe. The same issue occurred but I was able to resolve the issue when I created a new post that did not contain a shortcode. The only thing that I can conclude is that it seems that as long as the post containing the shortcode is not the newest post, then the issue will not present itself. However, when the post that has the shortcode is the newest post then anytime someone pings that post, a duplicate of that post is generated in the database. Very odd behavior.

    Plugin Author Boxy Studio

    (@boxystudio)

    I think I narrowed down what’s going on here. I tested this three ways:

    1. New post with embedded recipe
    2. New post with embedded recipe and some changes made to the code
    3. New post with Cooked deactivated

    For each of those I was seeing two posts created in the database. Upon further digging, I realized the answer is simple. WordPress is creating a new post and a revision post. This happens if you embed a recipe or not, and it even happens with Cooked disabled.

    Thread Starter jamesryancooper

    (@jamesryancooper)

    @boxystudio Actually, I have revisions disabled. The duplicate post that is created actually appears in my blog feed.

    Basically, if I create a recipe post with the Cooked shortcode and let’s say, for example, it has the slug /brownies-recipe/, upon publishing it, that single post will appear in my blog feed (as expected). However, once the post is visited a new duplicate post is generated with the slug /brownies-recipe-2/ and every time someone visits the post, a new duplicate post is create /brownies-recipe-3/, /brownies-recipe-4/, etc. I had upwards of 60 duplicates appearing in my blog feed before I was able to narrow it down to the Cooked shortcode. Once I removed the shortcode, the duplicates stopped being created. I’ll have to screen capture the next time it happens so that you can see what’s going on.

    My best guess is that the Cooked plugin is possibly having an issue with some other plugin that I have installed, but I’ve not been able to determine whether that is the case.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Major Bug: Posts with Cooked shortcode are being duplicated in WP db’ is closed to new replies.