add redirect for specific route #395
Merged
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.
Proposed changes
This PR adds a redirect route for the
/my_plugins_and_tools
path to resolve the issue where users clicking "View All your Plugin" were seeing a "nothing here" message instead of being taken to the solutions page. The redirect now properly takes users to/wp-admin/admin.php?page=solutions&category=all
as specified in the JIRA issue.Fixes: JIRA Issue - "View All your Plugin" redirects to blank page
Type of Change
Production
Bug Reproduction Steps:
Development
Video
Screen.Recording.2025-07-08.at.1.50.42.AM.mov
Checklist
Note: No tests were added as this is a temporary fix and not a permanent solution.
Pre-deployment Checklist
Post-deployment Checklist
How can the change be verified?
wp-admin/admin.php?page=bluehost#/my_plugins_and_tools
and verify it redirects to/wp-admin/admin.php?page=solutions&category=all
Further comments
This solution implements the redirect at the React Router level by adding a specific route for
/my_plugins_and_tools
that renders a redirect component. This approach is cleaner than checking URLs in the component lifecycle and follows React Router best practices.Important: This is a temporary fix to resolve the immediate user experience issue. The proper long-term solution would involve fixing the underlying marketplace module that generates the "View All your Plugin" link to point to the correct URL from the start.
Alternatives considered:
The redirect component (
MyPluginsAndToolsRedirect
) is simple and focused, usingwindow.location.href
to perform the redirect and returningnull
to prevent any rendering. The code follows WordPress coding standards with proper JSDoc documentation and formatting.edit: add jira link