Skip to content

CORS errors prevent some styles from loading in editor #741

@supernovia

Description

@supernovia

Describe the bug
Recently @bor0 fixed #737 and that made things much better. But I still see a CORS error due to a blocked stylesheet (and a number of font styles that 404, too)

It seems to stop me from being able to apply certain styles properly (like wide width) even though other styles are loading now.

To Reproduce
Steps to reproduce the behavior:

  1. Open the pattern submission editor
  2. Try adding a block with a wide width, and note it won't take
  3. Inspect Element > Console > Errors
  4. You'll see a handful of CORS errors there, including a 403 for this file:
    https://wordpress.org/patterns/wp-json/wp/v2/global-styles/490040?context=view&_locale=user

Noting there are also several 404s for font-related styles, like these:
https://wordpress.org/patterns/new-pattern/NotoSerif/NotoSerifJP/style.css
https://wordpress.org/patterns/new-pattern/NotoSerif/NotoSerifSC/style.css
https://wordpress.org/patterns/new-pattern/NotoSerif/NotoSerifKR/style.css

Expected behavior
Wide-width patterns should display properly and ideally we shouldn't have CORS errors.

Screenshots
Image

Desktop (please complete the following information):

  • OS: Mac 26.4.1 (25E253)
  • Browser: Chrome Version 147.0.7727.56 (Official Build) (arm64)

Smartphone (please complete the following information):

  • I didn't test since I can't reasonably test wide width or view CORS errors easily on my phone, but this likely applies across systems since we're dealing with 403s and 404s.

Additional context
We have some discussion here about this and another unrelated issue.
https://wordpress.slack.com/archives/C0AT21Q1ZS4/p1776088541328009
https://wordpress.slack.com/archives/C0AT21Q1ZS4/p1776088820809509

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions