Skip to content

'Clone' quick action redirects to dashboard if WP_SITEURL and WP_HOME are different domains #461

@REmenecker-SR

Description

@REmenecker-SR
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

When WordPress siteurl and home are on different domains or subdomains, cloning a post via the [Clone] link on the Posts/Pages edit.php page redirects the user to the Admin Dashboard page, not back to the edit.php page, as expected.

I can consistently reproduce this issue on different WordPress sites with WP v5.9.x (PHP 8.1) through 6.8.x (PHP 8.3).

To Reproduce

Step-by-step reproduction instructions

  1. In the WP Admin UI go to Settings > General and set the values of WordPress Address (URL) and Site Address (URL) to different domains.
  2. Go to the Posts page, hover over a post entry, and then click the Clone link that appears.
  3. Post is cloned to a new draft, and then the user is redirected to the Admin Dashboard page.

Expected results

  1. Cloning an article on the Posts page should redirect back to the Posts page after the post is successfully cloned. This is the experience when the WordPress Address and Site Address are the same domain regardless of path.

Actual results

  1. Cloning an article on the Posts page when the WordPress Address and Site Address are different domains (or subdomains) results in the user getting redirected to the Admin Dashboard page.

Screenshots, screen recording, code snippet

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

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: MS Edge, Brave

Used versions

  • Yoast Duplicate Post 4.5
  • WordPress 5.9.10, 6.3.2, and 6.8.3
  • PHP 8.1, 8.2, and 8.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions