Skip to content

671 silent cap on the amount of pages a user can select for manual selection#22426

Merged
vraja-pro merged 3 commits intofeature/llms-txt-phase-2from
671-silent-cap-on-the-amount-of-pages-a-user-can-select-for-manual-selection
Jul 14, 2025
Merged

671 silent cap on the amount of pages a user can select for manual selection#22426
vraja-pro merged 3 commits intofeature/llms-txt-phase-2from
671-silent-cap-on-the-amount-of-pages-a-user-can-select-for-manual-selection

Conversation

@leonidasmi
Copy link
Copy Markdown
Contributor

@leonidasmi leonidasmi commented Jul 11, 2025

Context

Summary

This PR can be summarized in the following changelog entry:

  • Prevents user from adding more than 100 pages in the llms.txt file.

Relevant technical choices:

  • Considered having an only-frontend limit, so that the user couldn't edit the 100 number in their PHP files, but decided to follow the don't trust the frontend rule after all.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Go to inc\options\class-wpseo-option-llmstxt.php and change the OTHER_INCLUDED_PAGES_LIMIT to 10, to make testing easier
    • This will prevent users from adding more than 10 other pages in the llms.txt file, both in the frontend of the settings and in the backend
  • Go to the llms.txt setting in a fresh site and start adding content pages
  • When you added the 10th one, there will be no more the Add page button
  • If you remove one content page, the Add page button will re-appear
  • Now, change the OTHER_INCLUDED_PAGES_LIMIT to 5 and go to src\llms-txt\application\configuration\llms-txt-configuration.php and change the 'otherIncludedPagesLimit' => $this->options_helper->get_other_included_pages_limit(), line to ''otherIncludedPagesLimit' => 10,
    • that way we can test the backend limit as well.
    • there will be a backend limit of 5 pages and a frontend limit of 10 pages.
  • Go again to the settings page and start adding content pages
  • When you have added 6, save.
  • Refresh and see that only the first 5 were saved.

Unrelated shortlink change:

  • Confirm that the shortlink in the Learn more about the llms.txt file. link at the top of the llms.txt settings page is pointing to https://yoa.st/llmstxt-learn-more

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:

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 #

@leonidasmi leonidasmi changed the base branch from trunk to llms-txt-phase-2/clean-up July 11, 2025 14:23
@leonidasmi leonidasmi added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Jul 11, 2025
@leonidasmi leonidasmi added this to the feature/llms-txt-phase-2 milestone Jul 11, 2025
@leonidasmi leonidasmi marked this pull request as ready for review July 14, 2025 06:16
Base automatically changed from llms-txt-phase-2/clean-up to feature/llms-txt-phase-2 July 14, 2025 06:17
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 6032902 into feature/llms-txt-phase-2 Jul 14, 2025
39 of 40 checks passed
@vraja-pro vraja-pro deleted the 671-silent-cap-on-the-amount-of-pages-a-user-can-select-for-manual-selection branch July 14, 2025 10:42
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.

2 participants