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

First pass at getting data for XML sitemaps from indexables #17580

Closed
wants to merge 27 commits into from

Conversation

jdevalk
Copy link
Contributor

@jdevalk jdevalk commented Oct 31, 2021

Summary

This PR can be summarized in the following changelog entry:

  • XML sitemaps are now beeing fed from the Indexables database.

Relevant technical choices:

  • Decided to remove the wpseo_sitemap_exclude_empty_terms and wpseo_sitemap_exclude_empty_terms_taxonomy filters. To remove terms from the XML sitemap, make sure they're set to noindex in Indexables.
  • Removed the wpseo_hit_sitemap_index action.
  • Removed the transient caching (which we defaulted not to use anyway so nobody had on probably).
  • The wpseo_sitemap_entry filter has the object_id, so the WordPress ID for the object, as its third parameter now.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Every indexable post type URL should be in the XML sitemaps;
  • Every indexable post type archive URL should be in the XML sitemaps;
  • Every image inside a post should be in the XML sitemap;

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

Impact check

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

  • This has a HUGE impact. Please test thoroughly.

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests 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.

Fixes #

@jdevalk jdevalk mentioned this pull request Oct 31, 2021
9 tasks
@jdevalk jdevalk added the changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog label Oct 31, 2021
@jdevalk jdevalk mentioned this pull request Nov 7, 2021
8 tasks

if ( count( $user_pages ) === 1 ) {
$page = '';
}

foreach ( $user_pages as $users_page ) {
array_shift( $users_page );
Copy link
Member

@diedexx diedexx Dec 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdevalk this line should be removed, right? It makes it that the second most recent last modified date is shown for each page instead of the most recent. Or is there something I'm missing?

@diedexx diedexx mentioned this pull request Dec 20, 2021
7 tasks
@diedexx
Copy link
Member

diedexx commented Dec 20, 2021

Replaced with #17869

@diedexx diedexx closed this Dec 20, 2021
@diedexx diedexx deleted the jdv/xml-sitemaps-indexables branch December 20, 2021 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants