Skip to content

Custom theme broken due to Playground path rewrites #2855

@tusharsnx

Description

@tusharsnx

Prerequisites

  • I have carried out troubleshooting steps and I believe I have found a bug.
  • I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

I'm using a custom theme (Newspaper). When I load the theme in Playground, the assets are being 404'd for most of the links. I found that this is due to how Playground handles path rewrite. A path like /wp-content/themes/Newspaper/includes/wp-booster/wp-admin/images/plugins/tagdiv-small.png is being transformed to /wp-admin/images/plugins/tagdiv-small.png (and later to /wordpress/wp-admin/images/plugins/tagdiv-small.png). This leads to 404 even though the file is present in the VFS at the original location.

Image Image Image

Expected behavior

All available assets are always served successfully to the client.

Actual behavior

The Browser receives not found error.

Steps to reproduce

I don't have a minimal repro for this due to the custom theme being a paid theme.

Isolating the problem

  • I have deactivated other plugins and confirmed this bug occurs when only this plugin is active.
  • This bug happens with a default WordPress theme active.
  • I can reproduce this bug consistently using the steps above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions