Skip to content

1171 fixed existing posts categories#23194

Merged
vraja-pro merged 4 commits intofeature/content-plannerfrom
1171-fixed-existing-posts-categories
Apr 27, 2026
Merged

1171 fixed existing posts categories#23194
vraja-pro merged 4 commits intofeature/content-plannerfrom
1171-fixed-existing-posts-categories

Conversation

@pls78
Copy link
Copy Markdown
Member

@pls78 pls78 commented Apr 24, 2026

Context

Summary

This PR can be summarized in the following changelog entry:

  • Fixes a bug where the posts' categories sent to content-planner/next-post-suggestion were always empty.

Relevant technical choices:

  • N/A

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Make sure you have categories assigned to your existing posts
  • Create a new post and click on Get content suggestions
  • Select one of the suggestion
    • Make sure the suggested category is an existing one

Alternative way to check this

  • Install and activate Log HTTP Requests plugin
  • Take note of the category associated to one of your first 100 posts, together with its id
  • Create a new post and click on Get content suggestions
  • Go to Tools -> Log HTTP Requests
  • Look for a request to https://ai-staging.yoa.st/api/v1/content-planner/next-post-suggestions
  • Click on it and copy the body
    • In the posts array, look for the post you noted down
      • Confirm the category is correct

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.

Impact check

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

  • N/A

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.
  • This PR also affects Yoast SEO for Google Docs. I have added a changelog entry starting with [yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached the Google Docs Add-on 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.
  • I have run grunt build:images and commited the results, if my PR introduces new images or SVGs.

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 https://github.com/Yoast/reserved-tasks/issues/1171

@pls78 pls78 added this to the feature/content-planner milestone Apr 24, 2026
@pls78 pls78 added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Apr 24, 2026
@pls78 pls78 changed the base branch from feature/content-planner to 1163-fix-category-handling April 24, 2026 09:45
@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 50

Warning

No base build found for commit 0884207 on 1163-fix-category-handling.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 43.117%

Details

  • Patch coverage: 18 uncovered changes across 1 file (1 of 19 lines covered, 5.26%).

Uncovered Changes

File Changed Covered %
src/ai/content-planner/infrastructure/recent-content/recent-content-collector.php 18 0 0.0%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 55772
Covered Lines: 25461
Line Coverage: 45.65%
Relevant Branches: 10425
Covered Branches: 3081
Branch Coverage: 29.55%
Branches in Coverage %: Yes
Coverage Strength: 5.42 hits per line

💛 - Coveralls

Base automatically changed from 1163-fix-category-handling to feature/content-planner April 27, 2026 08:39
Copy link
Copy Markdown
Contributor

@vraja-pro vraja-pro left a comment

Choose a reason for hiding this comment

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

CR & AC ✅

@vraja-pro vraja-pro merged commit 831e242 into feature/content-planner Apr 27, 2026
42 of 43 checks passed
@vraja-pro vraja-pro deleted the 1171-fixed-existing-posts-categories branch April 27, 2026 10:03
@vraja-pro vraja-pro mentioned this pull request Apr 28, 2026
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants