-
Notifications
You must be signed in to change notification settings - Fork 805
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
Blocks: load later to avoid doing it wrong notices #39696
Conversation
- Related discussion: p1728476310802029-slack-C0299DMPG - Related ticket: https://core.trac.wordpress.org/ticket/44937
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
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.
I note the testing instructions are incomplete. You also need to set a non-English (United States) language for your site (and install the corresponding translations).
Works as far as it goes. I'm still seeing the warning, but now it's coming from Automattic\Jetpack\Sync\Actions::init()
→ ::init_sync_cron_jobs()
→ ::maybe_schedule_sync_cron()
→ ::sanitize_filtered_sync_cron_schedule()
→ wp_get_schedules()
.
I also note that most of our blocks seem to call register_block_type()
from an 'init' hooked function. It's only Contact Info and Tiled Gallery that I found doing it directly on load. So possibly instead of this we could just fix those two blocks.
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.
Using the Jetpack Beta plugin for testing the PR, using the bleeding edge version of WordPress, I seem to be getting the notice both before and after applying the branch.
Just saw the previous review coming in so maybe this isn't applicable.
I'll close this in favor of #39841 which is a continuation - created a new PR instead of adding to this as the branch name didn't reflect the further changes needed. |
Proposed changes:
Let's load our blocks later to avoid any
_doing_it_wrong
notices introduced in the latest version of WordPress (6.7).Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Note
You'll want to
tail
your site's error logs while testing this.