Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.39k stars 1.98k forks source link

Accessing Patterns via the Command Pallete While Writing a Post in Calypso Causes "Refused to display (..) 'X-Frame-Options' to 'sameorigin'" error #92634

Open mrfoxtalbot opened 1 month ago

mrfoxtalbot commented 1 month ago

Quick summary

If you are editing a post via Calypso using Firefox, attempting to visit Patterns via the Command Palette causes an error.

This is ONLY happening with Firefox. In the case of Chrome, if you try to visit https://wordpress.com/post/example.com , you get redirected to https://example.com/wp-admin/post-new.php?post_type=post&calypsoify=1 and will work correctly

Watch video:

https://github.com/user-attachments/assets/fe96d0f4-7d52-4600-9ce1-ec20aaa7a627

This error seems to be directly related to

Steps to reproduce

  1. Visit https://wordpress.com/posts using Firefox
  2. Write a new post
  3. Look up "Patterns" in the Command Palette and click on it

What you expected to happen

It should work

What actually happened

It crashses and shows this error:

The loading of “https://mrfoxfreesite.wordpress.com/wp-admin/site-editor.php?postType=wp_block” in a frame is denied by “X-Frame-Options“ directive set to “sameorigin“.site-editor.php

Impact

All

Available workarounds?

Yes, difficult to implement

Platform (Simple and/or Atomic)

Simple, Atomic

Logs or notes

No response

mrfoxtalbot commented 1 month ago

Escalated p1720782495509149/1720705584.703329-slack-C02FMH4G8

mrfoxtalbot commented 1 month ago

Workaround: use the editor via /wp-admin/edit.php instead of wordpress.com/posts