Yoast / wordpress-seo

Yoast SEO for WordPress
https://yoast.com/wordpress/plugins/seo/
Other
1.74k stars 883 forks source link

Indexable database call detected when indexable is disabled via filter #21472

Closed shabnam611 closed 2 weeks ago

shabnam611 commented 1 month ago

Please give us a description of what happened

To Reproduce

Step-by-step reproduction instructions

  1. Install and activate Query monitor plugin
  2. Set your site to production
  3. Add the filer _add_filter( 'Yoast\WP\SEO\should_index_indexables', '__returnfalse' ); to set the indexable to false. I used the Code Snippets plugin to add the filter and activate it.
  4. Visit the frontend of the site and check Query monitor's Database query and look for the following outputs

Expected results

  1. There should not be Indexable calls being made on the front-end

Actual results

  1. Indexable calls are appearing on the front-end where it should not be

Screenshots, screen recording, code snippet

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

Twenty Twenty theme

Screenshot 2024-07-11 at 2 41 35 PM Screenshot 2024-07-11 at 2 40 48 PM

Twenty Twenty Four

Screenshot 2024-07-11 at 3 14 43 PM Screenshot 2024-07-11 at 3 15 04 PM

Technical info

Used versions

shabnam611 commented 1 month ago

+1 https://wordpress.org/support/topic/yoast-database-calls-expected-results/

Pcosta88 commented 1 month ago

Thank you!

josevarghese commented 2 weeks ago

Closing this issue, as we have an internal FR with comments from the development team having the technical proposal on how to remove indexables related queries when the indexable filter Yoast\WP\SEO\should_index_indexables is set as false here: https://github.com/Yoast/featurerequests/issues/829.