Skip to content

Return to Plugin Screen button leads to 404 if WordPress is not installed at the web server root #95

@jefferyto

Description

@jefferyto

Bug Report

User Story

As a WordPress admin user, I want to return to the Plugins page after rolling back a plugin so that I can check the plugin was downgraded successfully.

Current Behavior

If WordPress is not installed at the server root (i.e. in a subdirectory), then clicking the Return to Plugin Screen button in the Rollback Complete modal leads to a 404 page.

Expected Behavior

Clicking the Return to Plugin Screen button goes to the Plugins page.

Bug Type

  • This bug describes functionality that once worked as expected in version X.X.X.
  • This bug describes functionality that never worked as expected.
  • I am not sure whether this functionality ever worked as expected.

Steps to Reproduce

  1. Install WordPress to a subdirectory.
  2. Rollback a plugin
  3. Click the Return to Plugin Screen button in the Rollback Complete modal

Possible Solution

Compute the correct path name based on window.location.pathname in

? `${ window.location.origin }/wp-admin/themes.php`
: `${ window.location.origin }/wp-admin/plugins.php`;

Related

Acceptance Criteria

  • Clicking on the Return to Plugin Screen button leads to the Plugins page.

Environment

Operating System
  • Platform: Linux
  • Version: Ubuntu 25.04
Browser
  • Name: Firefox
  • Version: 141.0.3
WordPress System Info WordPress 6.8.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions