Automattic / wp-calypso

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

Command Palette switching to site-editor doesn't work #77681

Open dsas opened 1 year ago

dsas commented 1 year ago

Quick summary

Using the new command palette in Gutenberg 19 to switch from the post-editor to the site-editor doesn't work - the site-editor doesn't load and an error message is displayed instead.

Presumably this is related to the post-editor being iframed and the site-editor not being iframed as I get this message in my console:

The loading of “https://deantest08.wordpress.com/wp-admin/site-editor.php?postType=wp_template&postId=pub%2Fblank-canvas-3%2F%2Findex” in a frame is denied by “X-Frame-Options“ directive set to “SAMEORIGIN“.

Going from the post-editor to the site-editor does work.

Steps to reproduce

  1. Open up the post editor at wordpress.com/post/:site
  2. Press + k to open up the command palette
  3. Type the name of a template, e.g. index
  4. Press enter

https://github.com/Automattic/wp-calypso/assets/93301/4e9c08f3-6967-4eff-b6af-d25d12efcc51

What you expected to happen

The site editor to be opened up showing the index

What actually happened

I got an error in the browser:

image

Impact

All

⌘ + k isn't hinted at in the post-editor, it requires that you learned it in the site editor first.

Available workarounds?

Yes, easy to implement

Just use the normal way of switching templates - by navigating using the menus to the site-editor.

Platform (Simple and/or Atomic)

Simple & Atomic

It doesn't affect .org sites.

Logs or notes

Reproduced on Firefox and Chrome.

cuemarie commented 1 year ago

📌 SCRUBBING : RESULT - Replicated / Could Not Replicate / Uncertain

📌 FINDINGS/SCREENSHOTS/VIDEO

Screenshots/Recordings

Atomic Site

https://github.com/Automattic/wp-calypso/assets/27249804/fe8232a1-5901-4a8a-9989-3555eeb382e0

Self-Hosted Site for comparison

https://github.com/Automattic/wp-calypso/assets/27249804/552c8860-2342-4fee-828f-e2520b7fb4ec

📌 ACTIONS