wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

"Preview in New Tab" not waiting for the article to save a draft

Open jgutix opened this issue 1 year ago • 1 comments

  • [x] I've read and understood the contribution guidelines.
  • [x] I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

To Reproduce

Step-by-step reproduction instructions

  1. Enable Yoast SEO plugin
  2. Create or Edit an article
  3. Click on the "Preview" icon then click on "Preview in new Tab"

Expected results

  1. The article being edited should open in a new tab with an url like: "?post_type=article&p=15528973&preview=true&_thumbnail_id=15529007!

Actual results

  1. The new tab is open to a link like "wp-admin/undefined" or redirected to home

This issue has been reported previously to Wordpress: https://core.trac.wordpress.org/ticket/59915

Screenshots, screen recording, code snippet

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

https://github.com/Yoast/wordpress-seo/assets/1747459/51dc41b2-024d-4529-8236-22e676a3b267

Technical info

  • If relevant, which editor is affected (or editors):
  • [ ] Block Editor
  • [x] Gutenberg Editor
  • [ ] Elementor Editor
  • [ ] Classic Editor
  • [ ] Other:
  • Which browser is affected (or browsers):
  • [x] Chrome
  • [ ] Firefox
  • [ ] Safari
  • [ ] Other:

Used versions

  • Device you are using:
  • Operating system:
  • PHP version: 8.1
  • WordPress version: 6.4.2
  • WordPress Theme: Custom
  • Yoast SEO version: 21.6
  • Gutenberg plugin version:
  • Elementor plugin version:
  • Classic Editor plugin version:
  • Relevant plugins in case of a bug:

jgutix avatar Feb 08 '24 20:02 jgutix

Hi @jgutix

Thanks for using the Yoast SEO plugin and for creating this issue.

I tried to replicate the issue by following the steps you have shared above and noticed that the issue is not reproducible with Yoast SEO and the Gutenberg plugin set as active.

You can see the screencast below for your reference: https://www.loom.com/share/607a8a36873245d1934b740e27b57e0c where you can see the preview is loading without any issues.

First, please note that the recent version of the Yoast SEO plugin is 22.0 (released on February 6, 2024), and from the details you have shared with us, it seems like you are using an older version, 21.6 (which we released on November 28, 2023). So we recommend you to update the Yoast SEO plugin to 22.0 and all other plugins and themes on the website to the latest version after taking a backup.

Also, from the screencast you shared with us, it seems like other plugins are also active, so we recommend you perform a conflict check by activating a default theme like  [Twenty Twenty-Two] with Yoast SEO as the first step to narrow down the issue caused by other plugins and themes on your website via a staging site.

If you don't know how to perform a conflict check, please follow the steps mentioned below: The fastest way to rule out any conflict is to deactivate all non-Yoast plugins and switch to a standard theme like Twenty Twenty-Two.

Please test this on your development or staging site, if you have one. If not, we recommend using the Health Check & Troubleshooting plugin. This plugin has a troubleshooting mode, which does not affect normal visitors to your site.

If you're unfamiliar with checking for conflicts, we'd like to point you to a step-by-step guide that will walk you through the process: How to check for plugin conflicts.

We hope this helps you in the right direction.

josevarghese avatar Feb 08 '24 21:02 josevarghese

Closing this issue due to inactivity. If the issue persists, please provide additional information so that we can investigate it further.

josevarghese avatar Mar 13 '24 06:03 josevarghese