Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title and Meta description not updating on version 23.0 #21459

Closed
2 tasks
adouglasiVET opened this issue Jul 3, 2024 · 3 comments
Closed
2 tasks

Title and Meta description not updating on version 23.0 #21459

adouglasiVET opened this issue Jul 3, 2024 · 3 comments

Comments

@adouglasiVET
Copy link

adouglasiVET commented Jul 3, 2024

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

Please give us a description of what happened

Whenever we update title tags or meta descriptions in the Yoast settings for each page, they are not actually updating on the site, and don’t reflect the changes on the all pages preview. See screenshots below:

Yoast settings:

https://drive.google.com/file/d/1c7A53ZmF_JFVewEcJ-2xd-08HNYOkDIW/view?usp=sharing

All Pages preview:

https://drive.google.com/file/d/1FQAbJAB4GH8gx_5v2oKL7okq3P7eutqK/view?usp=sharing

Not reflected in source code:

https://drive.google.com/file/d/1SzHPm9oWz4m4QsbWx4_jRgULTOsNVPDZ/view?usp=sharing

Title should be updated to: Best Vet Near Me [Zip Code] – [Hospital Name] – [City/State]

We tested deactivating all plugins (other than Yoast) and activated the default theme (WordPress 2024) and the issue is still happening.

This issue is only happening on the new version of the plugin (v23.0), and it happens on every single staging site we have checked.

We have tried this method to fix (and it works), however, we can't do this every single time we need to create a new staging site from a live site:

We added this line:

define( ‘WP_ENVIRONMENT_TYPE’, ‘production’ );

installed and ran this plugin:

https://wordpress.org/plugins/yoast-test-helper/

clicked on the ‘Reset indexables tables & migrations’, ‘Reset Prominent words calculation’, and ‘Reset Internal link counter’ buttons.

Went to Yoast SEO > Tools and re-ran SEO data optimization and the issue appears to be fixed.

Why is this only happening on the new version of Yoast? Are we just going to have to do this for every staging site we use going forward, so that we can do SEO changes in staging before moving to production? This would be a huge hassle to do every time we want to update SEO on a staging environment ….

Something changed with the new plugin that doesn’t properly update the database. Prior versions do not have this issue.

To Reproduce

Step-by-step reproduction instructions

  1. Log into the site
  2. Try updating a title tag or meta description in the page/post editor.
  3. It does not update.

Expected results

  1. The title tag or meta description should be updated.

Actual results

  1. It does not update the title tag or meta description.

Screenshots, screen recording, code snippet

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

https://drive.google.com/file/d/1sDdXIb5ozj76DrZFb4PTP2LjB3P4pNtQ/view

Technical info

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

Used versions

  • Device you are using: Browser
  • Operating system: Ubuntu Linux with NGINX/PHP/MySQL
  • PHP version: 8.2
  • WordPress version: newest version
  • WordPress Theme: default 2024 Wordpress theme
  • Yoast SEO version:
  • Gutenberg plugin version:
  • Elementor plugin version:
  • Classic Editor plugin version:
  • Relevant plugins in case of a bug: Yoast SEO 23.0
@josevarghese
Copy link
Contributor

Hi @adouglasiVET

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

In version 23.0, we fixed a bug that caused unnecessary data to be written in the Yoast indexable database on non-production sites (where the environment is not set as non-production) or when the Yoast\WP\SEO\should_index_indexables filter was used to disable the indexable. Please take a look at the PR here for your reference. This bug fix was to fully prevent the creation of indexable data on the staging site. Otherwise, when migrating the site from staging to live, the indexable must be reset manually, else the Yoast indexable database will contain the staging site URLs, and it may get outputted on the source code.

Regarding the issue you pointed out, we followed the steps you mentioned on the staging site and noticed that the values you added to the Yoast metabox are saved in the database. However, the overview screen outputs the recently created SEO title and meta description values on the column for all the posts. So we created a new issue for it here: #21460.

We tried the other issue you pointed out, with the page source code not getting outputted with the SEO title and meta description you added to the metabox. Upon our lab sites, we noticed that the SEO title and meta description with the values added to the Yoast metabox are outputting correctly on the source code without any actions. So, to narrow down the issue further, can you please check whether you have added any filters for the indexable or set the environment as staging other than the WP_ENVIRONMENT_TYPE?

Also, please make sure to reset the indexable again on the staging site to check whether the issue continues with version 23.0. After resetting the indexable, can you please check the database to see whether the table yoast_indexable contains any values?

We look forward to hearing from you and are happy to help you.

@adouglasiVET
Copy link
Author

adouglasiVET commented Jul 9, 2024

I have not changed or added anything at all. We have not added any filters for the indexable, or set the environment as staging outside of the normal staging site process from our host Kinsta. There are these lines at the top of wp-config.php:

<?php /* BEGIN KINSTA DEVELOPMENT ENVIRONMENT - DO NOT MODIFY THIS CODE BLOCK */ ?>
<?php if ( !defined('KINSTA_DEV_ENV') ) { define('KINSTA_DEV_ENV', true); /* Kinsta development - don't remove this line */ } ?>
<?php if ( !defined('JETPACK_STAGING_MODE') ) { define('JETPACK_STAGING_MODE', true); /* Kinsta development - don't remove this li>
<?php /* END KINSTA DEVELOPMENT ENVIRONMENT - DO NOT MODIFY THIS CODE BLOCK */ ?>

I just want to be clear that we changed nothing, but this issue happens on ALL staging sites once updated to Yoast 23.0. This issue did not occur at all prior to version 23.0.

I would like clarification on this:

will we now need to go through ALL of our staging sites and add this line to wp-config.php:

define( ‘WP_ENVIRONMENT_TYPE’, ‘production’ );

Then follow this guide to reset indexables: https://yoast.com/help/how-to-reset-yoast-indexables/ to get the new version of Yoast to work properly in staging environments, correct?

What needs to be done when we are ready to push staging to live? I’m guessing we should first remove:

define( ‘WP_ENVIRONMENT_TYPE’, ‘production’ );

Its just a huge pain that we have to do a ridiculous workaround on hundreds of staging sites just to get this plugin to work as expected on non-production/staging environments. Boggles my mind that this is pushed back on the user to solve this issue.

@josevarghese
Copy link
Contributor

Closing as our support team already responded to your forum topic with link to the issue we have created for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants