Skip to content

Conversation

amartya-dev
Copy link
Contributor

@amartya-dev amartya-dev commented Jul 7, 2025

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

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update
  • Refactoring / housekeeping (changes to files not directly related to functionality)

Bug Reproduction Steps:

  1. Login to Account
  2. Purchase WP solution for any site
  3. Go to site
  4. Click on "View All your Plugin"
  5. Redirects to plugin page but shows "nothing here" message

Development

  • Tests
  • Dependency update
  • Environment update / refactoring
  • Documentation Update

Video

Screen.Recording.2025-07-08.at.1.50.42.AM.mov

Checklist

  • I have read the CONTRIBUTING doc
  • I have viewed my change in a web-browser
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Note: No tests were added as this is a temporary fix and not a permanent solution.

Pre-deployment Checklist

  • No environmental variables or dependencies required for this change

Post-deployment Checklist

How can the change be verified?

  • Navigate to wp-admin/admin.php?page=bluehost#/my_plugins_and_tools and verify it redirects to /wp-admin/admin.php?page=solutions&category=all
  • Verify that other routes continue to work as expected
  • Test that the "nothing here" message no longer appears for the my_plugins_and_tools route

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:

  1. Component-level URL checking: Initially implemented URL pattern checking in the AppBody component, but this was less clean and harder to maintain.
  2. Catch-all route modification: Considered modifying the existing catch-all route, but this would affect other unknown routes.
  3. Router-level redirect: Chosen as the best approach because it's explicit, maintainable, and follows React Router conventions.

The redirect component (MyPluginsAndToolsRedirect) is simple and focused, using window.location.href to perform the redirect and returning null to prevent any rendering. The code follows WordPress coding standards with proper JSDoc documentation and formatting.

edit: add jira link

- Add StagingRedirect component to redirect /staging to /wp-admin/admin.php?page=nfd-staging
@amartya-dev
Copy link
Contributor Author

Added staging redirect functionality to complement the existing my_plugins_and_tools redirect. The /staging route now properly redirects users to /wp-admin/admin.php?page=nfd-staging instead of showing the "nothing here" message.

Related Issue: SOFT-167060

Changes Made:
Added StagingRedirect component with proper JSDoc documentation
Added /staging route in the React Router configuration
Follows the same pattern as the my_plugins_and_tools redirect for consistency
Maintains WordPress coding standards and React Router best practices
Both redirects are now implemented at the router level, providing a clean and maintainable solution for handling these specific URL patterns.

@amartya-dev amartya-dev changed the base branch from main to develop July 8, 2025 00:25
@circlecube circlecube added this to the July 16, 2025 Release milestone Jul 8, 2025
@circlecube circlecube merged commit 6e92d49 into develop Jul 8, 2025
4 of 23 checks passed
@circlecube circlecube deleted the SOFT-167625-my-plugins-and-tools-blank-page branch July 8, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants