Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mrfoxtalbot opened this issue Aug 28, 2024 · 7 comments
Assignees
Labels
[Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Post/Page Editor The editor for editing posts and pages. [Platform] Simple [Pri] High Address as soon as possible after BLOCKER issues [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts Triaged To be used when issues have been triaged. [Type] Bug When a feature is broken and / or not performing as intended

Comments

@mrfoxtalbot
Copy link

mrfoxtalbot commented Aug 28, 2024

Quick summary

While working on the Calypso editor, I tried to create a new page but the editor crashed:

Kapture.2024-08-28.at.08.58.11.mp4

I see this error:
Refused to display 'https://gomezsorianoclara.wordpress.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Interestingly enough, creating a new post works correctly (it redirects to foo.wordpress.com/wp-admin/post-new.php)

Steps to reproduce

  1. Go to https://wordpress.com/post/
  2. Go to the command palette and search for "Page"
  3. Click on "New Page"

What you expected to happen

It should create a new page

What actually happened

It crashed

Impact

All

Available workarounds?

Yes, easy to implement

If the above answer is "Yes...", outline the workaround.

The wp-admin at wp-admin/post-new.php works fine.

Platform (Simple and/or Atomic)

Simple

Logs or notes

This seems directly related to this other bug that was affecting patterns:

@mrfoxtalbot mrfoxtalbot added [Type] Bug When a feature is broken and / or not performing as intended [Feature] Post/Page Editor The editor for editing posts and pages. Needs triage Ticket needs to be triaged [Product] WordPress.com All features accessible on and related to WordPress.com. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. labels Aug 28, 2024
@mrfoxtalbot
Copy link
Author

@xavier-lc, I see you fixed the previous related issue. Is this a regression? Could you please take a look? Thank you!

@mrfoxtalbot mrfoxtalbot moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Aug 28, 2024
@mrfoxtalbot mrfoxtalbot added Triaged To be used when issues have been triaged. [Pri] High Address as soon as possible after BLOCKER issues and removed Needs triage Ticket needs to be triaged labels Aug 28, 2024
@github-actions github-actions bot added [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts [Platform] Simple labels Aug 28, 2024
@miksansegundo
Copy link
Contributor

We have fixed a similar error in another screen by using the function openLinksInParentFrame. See #83472

@epeicher epeicher self-assigned this Sep 2, 2024
@xavier-lc
Copy link
Contributor

@mrfoxtalbot hey, sorry for the late reply, I was AFK last week.

@epeicher are you working on this? If not, I can take over.

@epeicher
Copy link
Contributor

epeicher commented Sep 2, 2024

@xavier-lc I have created this draft PR as proof of concept for a potential fix for the Add new Page command: #94114.

But I think this can be generalized, as it also affects the Add new Post command. I have based the changes in this PR from you, so I am happy if you take over because you probably have more context on this than me, as I'm modifying this code for the first time 😄

@xavier-lc
Copy link
Contributor

We have fixed a similar error in another screen by using the function openLinksInParentFrame. See #83472

Thanks for sharing. I don't think it works in this case, though, because the commands don't have an actual link, they run a callback.

@epeicher
Copy link
Contributor

epeicher commented Sep 3, 2024

Fixed in #94114
Deployed in r303334-wpcom

Waiting for the wpcom-block-editor cache to expire to test the changes in production

@epeicher
Copy link
Contributor

epeicher commented Sep 3, 2024

After the wpcom-block-editor is deployed and the cache has expired, we can see this is fixed. Here are some videos:

Add new page

CleanShot.2024-09-03.at.18.43.28.mp4

Add new post

CleanShot.2024-09-03.at.18.44.03.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Post/Page Editor The editor for editing posts and pages. [Platform] Simple [Pri] High Address as soon as possible after BLOCKER issues [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts Triaged To be used when issues have been triaged. [Type] Bug When a feature is broken and / or not performing as intended
Development

No branches or pull requests

4 participants