Fix infinite indexing loop bug#23050
Open
pls78 wants to merge 4 commits into
Open
Conversation
Make the ajaxHelper available on all pages where indexing runs (Tools, Dashboard, FTC), not just editor pages where window.yoast.editorModules is defined. This allows Premium's prominent words indexation to access it reliably.
Detect when the server returns the same batch twice (same next_url and same first object_id) and surface an error instead of looping forever. Applies to both the Tools page and FTC indexation components.
Pull Request Test Coverage Report for Build 58c73f3343ba0bee70e2914c206095ffb8a51e8fWarning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Co-Authored-By: Claude Opus 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Fixes an infinite indexing loop that could occur when the SEO data optimization process gets stuck re-processing the same batch of indexables indefinitely. This also exposes a helper needed by premium's prominent words indexation on non-editor pages.
Summary
This PR can be summarized in the following changelog entries:
doAjaxRequesthelper viawindow.yoast.indexing.helpersso premium add-ons can use it on indexing pages outside the editor.Relevant technical choices:
next_urland the firstobject_idin the response to detect when the server is stuck returning the same batch. If both match the previous iteration, an error is thrown to break the loop.doAjaxRequestis exposed onwindow.yoast.indexing.helpersrather thanwindow.yoast.editorModulesbecause the indexation page does not load editor modules.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
Relevant test scenarios
Test instructions for QA when the code is in the RC
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
window.yoast.indexingJavaScript API surfaceOther environments
Documentation
Quality assurance
grunt build:imagesand commited the results, if my PR introduces new images or SVGs.Innovation
innovationlabel.