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
General: Fail on load if using unsupported WP. #11609
Conversation
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: April 2, 2019. |
a4a1f06
to
c702b04
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.
Quick i18n change.
Co-Authored-By: kraftbj <public@brandonkraft.com>
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.
Works well.
I'm not sure if this is in scope or not, but going to /wp-admin/admin.php?page=jetpack in WordPress 4.9 just displays the "Sorry, you are not allowed to access this page." error (since the jetpack menu item is never created).
Should we add a stub menu item there that just contains the new admin notice?
*/ | ||
function jetpack_admin_unsupported_wp_notice() { ?> | ||
<div class="notice notice-error is-dismissible"> | ||
<p><?php esc_html_e( 'Jetpack requires a more recent version of WordPress and has been paused. Please update WordPress to continue enjoying Jetpack.', 'jetpack' ); ?></p> |
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.
Would it make sense to provide the user with a link to support to help them achive updating of WordPress.
also does do we show this to everyone.
Even non admins?
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.
As it stands, it shows to everyone. I'm okay not changing behavior though because it would only been shown on sites that upgraded to Jetpack in some atypical way and with Jetpack not working, it would be pretty apparent to anyone who used any feature.
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. 👍 It's not as pretty as the other banners you can get when Jetpack actually runs so it may not be as visible (it's easier to miss if you have other banners already installed), but it does the trick!
cc @danjjohnson This is important, as it will potentially happen to some of our users in the next release. I would recommend preparing a predef explaining to folks the need to update to WP 5.0, the mininum supported version of WordPress, if they want to continue to use Jetpack. We may mention the classic editor plugin in there since I assume some people have refrained from updating because their site is not ready for the block editor. |
To add on, this is normal for Jetpack (only supporting the current and last previous major version of WP), so we're only being a bit extra cautious since it's been awhile since we bumped previous versions due to the long development cycle of 5.0. |
Replaces and closes #11572
Every normal way of updating Jetpack will not allow us to update to on an unsupported version of WordPress, but we can just be extra careful in the event someone runs an unexpected upgrade (e.g. via FTP, Git, etc).
Changes proposed in this Pull Request:
Testing instructions:
If checking out master, it'll hard fatal. If checking out this branch, Jetpack will still be active, but there will be an admin_notice requesting an upgrade to keep using Jetpack.
Proposed changelog entry for your changes: