-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix update apiVersion of block to version 3 #211
Conversation
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.
In testing this out, I can't get the block to load properly using apiVersion
3. The block exists and I can add it to the content but it just shows a loading icon and the block settings aren't shown in the sidebar panel. If I downgrade to v2, things work as expected
@dkotter sorry that I didn't notice. From all my experience with version 3 I had never encountered a failure and since I implemented the initial iframe support I assumed it would just work. My bad. Will dive into this. Relly odd that it fails 🤔 |
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.
@jeffpaul @wadebekker and I worked on this together for a bit today and figured out that in fact this issue had been present for at least the last 4 major WP releases... 😞
But this code does now fix the issue and also resolves the API Version 3 problem.
Before the api version change the issue was only noticeable inside the site editor which was always loaded in an iframe...
Co-authored-by: Fabian Kägy <[email protected]>
… editor is loaded in an iframe
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.
Thanks for all the work here! Tested things out and works great. Had to fix the E2E tests since the editor now loads in an iframe and Cypress doesn't like that without a few changes but all looks good now
Description of the Change
Since WordPress 6.3 any blocks that support being rendered in an iframe should use
apiVersion: 3
or higher. The Apple maps block has long supported being rendered in an iframe because of the Site Editor support. So we should have opted in right away.Closes #
How to test the Change
Everything should work as expected.
Changelog Entry
Credits
Props @fabiankaegy
Checklist: