Merged
Conversation
up1512001
commented
Dec 19, 2025
up1512001
commented
Dec 19, 2025
justlevine
reviewed
Dec 19, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses QA issues and fixes fatal errors in the OneSearch plugin. The main focus is preventing fatal errors related to undefined constants during plugin uninstall and handling exceptions during content processing, along with UI improvements to the settings interface.
- Adds fallback constant definition for
ONESEARCH_DIRin uninstall.php to prevent fatal errors - Wraps
the_contentfilter application in try-catch block to handle exceptions gracefully - Implements state management to disable UI controls during save operations and adds a confirmation modal for re-indexing
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| uninstall.php | Adds conditional definition of ONESEARCH_DIR constant to prevent fatal error when plugin files are deleted during uninstall |
| inc/Modules/Search/Post_Record.php | Wraps the_content filter in try-catch to handle exceptions during content processing |
| assets/src/components/SiteSearchSettings.js | Adds isIndexableEntitiesSaving prop and disables controls during entity saving operations |
| assets/src/components/SiteIndexableEntities.js | Lifts saving state to parent component, adds confirmation modal for re-indexing with explanatory text |
| assets/src/admin/search/index.js | Introduces shared saving state and passes it to child components for coordinated UI control |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
justlevine
approved these changes
Dec 19, 2025
Collaborator
justlevine
left a comment
There was a problem hiding this comment.
This can be squash-merged when the remaining comments are resolved. No need to ping for rereview 🚀
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.
Technical Details
Address Fatal error plus fix QA issues.
{"code":"qm_fatal","message":"Uncaught Error: Undefined constant \"OneSearch\\ONESEARCH_DIR\" in ~/app/public/wp-content/plugins/onesearch/inc/Autoloader.phpChecklist
Screenshots
To-do
Fixes/Covers issue
Fixes #
Part of https://github.com/rtCamp/OnePress/issues/59#issuecomment-3674061736