Skip to content

25.5-Google docs introduction model has react warnings in the console #2395#22480

Merged
JorPV merged 1 commit intotrunkfrom
2395-fix-ai-optimize-introduction-warnings-in-console
Aug 7, 2025
Merged

25.5-Google docs introduction model has react warnings in the console #2395#22480
JorPV merged 1 commit intotrunkfrom
2395-fix-ai-optimize-introduction-warnings-in-console

Conversation

@mykola
Copy link
Copy Markdown
Contributor

@mykola mykola commented Aug 6, 2025

Context

  • Fix AI Optimize react warning message in console for upsell modal displayed in Yoast admin.

Summary

This PR can be summarized in the following changelog entry:

  • Fixes a console warning message triggered by the introductions in the Yoast admin page.

Relevant technical choices:

  • Remove warning message if introduction is not present in php code but we have it in JS code.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Check that console warning is not displayed

  • Have Free and Premium activated.
  • go to the wp-config.php file of your test site (as explained in the DoD) and add the following PHP constant to the file:
    if ( ! defined( 'SCRIPT_DEBUG' ) ) { define( 'SCRIPT_DEBUG', true ); }
  • Open the database for your test site in any sql editor or use wp db query wp-cli command and remove _yoast_wpseo_introductions meta_key from wp_usermeta table:

DELETE FROM wp_usermeta WHERE meta_key = '_yoast_wpseo_introductions'
image

  • Go to the Yoast SEO admin tab. with the dev. tools console open.
  • Confirm that you see an introduction modal.
  • Check the console and confirm warning message is not displayed:
image

Check that AI Optimize introduction modal is displayed

  • Have Free and Premium activated.
  • go to the wp-config.php file of your test site (as explained in the DoD) and add the following PHP constant to the file:
    if ( ! defined( 'SCRIPT_DEBUG' ) ) { define( 'SCRIPT_DEBUG', true ); }
  • Open the database for your test site in any sql editor or use wp db query wp-cli command and remove _yoast_wpseo_introductions meta_key from wp_usermeta table:

DELETE FROM wp_usermeta WHERE meta_key = '_yoast_wpseo_introductions'
image

  • Create any post
  • Confirm that you see an AI Optimize introduction modal:
image
  • Check the console and confirm warning message Warning: Introductions received a registration for an unknown key: ai-optimize-classic is not displayed.

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

  • Should not impact any other place

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #2395

@mykola mykola added changelog: other Needs to be included in the 'Other' category in the changelog changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog and removed changelog: other Needs to be included in the 'Other' category in the changelog labels Aug 6, 2025
@mykola mykola marked this pull request as ready for review August 6, 2025 07:35
@mykola mykola changed the base branch from trunk to release/25.7 August 6, 2025 07:35
@mykola mykola changed the base branch from release/25.7 to trunk August 6, 2025 07:36
@mykola mykola added changelog: other Needs to be included in the 'Other' category in the changelog and removed changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog labels Aug 6, 2025
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 6bd2b5341257a74e34ca712fb651bc4a5a38ed30

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage remained the same at 52.85%

Files with Coverage Reduction New Missed Lines %
packages/js/src/introductions/components/provider.js 1 0.0%
Totals Coverage Status
Change from base Build f93d15c18871d1f4c0d455a72b1636f49d8e98cc: 0.0%
Covered Lines: 31181
Relevant Lines: 59707

💛 - Coveralls

@JorPV
Copy link
Copy Markdown
Contributor

JorPV commented Aug 7, 2025

CR + AT ✅

@JorPV JorPV merged commit a205096 into trunk Aug 7, 2025
32 checks passed
@JorPV JorPV deleted the 2395-fix-ai-optimize-introduction-warnings-in-console branch August 7, 2025 08:18
@leonidasmi leonidasmi added this to the 25.8 milestone Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: other Needs to be included in the 'Other' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants