Yoast / Yoast/duplicate-post

Two draft posts being created at once

Open
#384 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
53
Forks
38
Avg merge
4d 8h
Merged PRs (30d)
1

Description

  • I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened

When I click on the “copy to a new draft” button, two drafts are created. We need to delete the extra one each time we use this plugin, and sometimes upon trying to delete the duplicate post we get the error "Error in moving the item to Trash".

After testing further it appears this issue only impacts Google Chrome users. Switching to Firefox or Safari results in only one draft post being created as expected. There is an open ticket in the WP support forum confirming this

To Reproduce
Step-by-step reproduction instructions
  1. From the post listings screen in wp-admin (impacts cpts and regular posts), hover over a post and click "Clone".
Expected results
  1. Only one draft post is created
Actual results
  1. Two draft posts are created
Screenshots, screen recording, code snippet

If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.

image

Technical info
  • If relevant, which editor is affected (or editors):
  • Block Editor
  • Gutenberg Editor
  • Classic Editor
  • Other:
  • Which browser is affected (or browsers):
  • Chrome
  • Firefox
  • Safari
  • Other:
Used versions
  • Device you are using:
  • Operating system: MacOS Sonoma
  • PHP version: 8.2
  • WordPress version: 6.5.5
  • WordPress Theme:
  • Yoast Duplicate Post version: 4.5
  • Gutenberg plugin version:
  • Classic Editor plugin version:
  • Relevant plugins in case of a bug:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the Clone action in the wp-admin post listings screen and reproduce the issue in Chrome, comparing it with Firefox or Safari. Trace the cloning request and verify that one click creates exactly one draft without the related trash error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.