-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Remove broken site editor redirect #48283
Conversation
Size Change: -21 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
What's the impact on older versions? We have to support WP 6.1 in the Gutenberg plugin until 6.3 is released. |
The impact is mentioned in the description:
It's the sidebar state that will be different, it's like you'll be in a child screen of navigation and not the root level of the site editor. |
Sorry, not sure how I missed that 🤦♂️ Catching up with a lot of things today 😅 The code looks good to me, but I will test with different versions of WP and leave a final review shortly 👍 |
@youknowriad can you rebase the PR? Thanks! |
e3aa6a9
to
29b1bbd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works well in my tests. The impact is pretty small on older WP versions than I initially expected.
I just cherry-picked this PR to the wp/6.2 branch to get it included in the next release: d09d368 |
Gutenberg 15.2 introduced a core compat redirect for the Site Editor that the WoA site in question from being logged-in. It was already removed: WordPress/gutenberg#48283 Fixes Automattic/wp-calypso#74072
What?
In previous WP versions, when you load the site editor, we used to fetch the home page and redirect to it (adding some params to the url), we don't rely on this behavior anymore and in order to "cancel" the redirect in Gutenberg we had a filter that was supposed to do that. The problem is that that filter doesn't work properly:
I'm removing that redirect in this filter. The impact of this change is that in previous WP versions when you load the site editor, it won't load the site editor sidebar in the "root" screen, instead it will load the "home page" that is set as static and opens it in the site editor. I think this is not perfect but it's fine.
Testing
There shouldn't be any impact here unless you explicitly load an old WP version (6.1) in addition to the Gutenberg plugin.