#48245 closed enhancement (fixed)
Add extra details to the error message for a plugin's minimum supported PHP version
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 5.3 |
Component: | Site Health | Keywords: | has-patch has-dev-note |
Focuses: | Cc: |
Description
When activating a plugin which has a minimum PHP version version requirement that's higher than that which is installed, the following message is shown in a wp_die()
error:
Current PHP version does not meet minimum requirements for <plugin>.
This is a blocking error and doesn't provide the user with any information to help them make a decision about what to do next.
Some helpful information should be added to this screen:
- The plugins' minimum required PHP version
- The current PHP version
- A link to the support documentation on how to update PHP
Attachments (2)
Change History (20)
This ticket was mentioned in Slack in #core by sabernhardt. View the logs.
5 years ago
#4
@
5 years ago
- Component changed from Plugins to Site Health
- Keywords servehappy removed
- Milestone changed from Awaiting Review to Future Release
- Owner set to johnbillion
- Status changed from new to reviewing
#5
follow-up:
↓ 7
@
5 years ago
Thanks for the patch @stuffradio.
I've taken a look and I've got some feedback for you. If you'd like to submit an updated patch you can upload it with the same file name.
- In order to aid translators when there are multiple placeholders within a string, these need to use the numbered placeholder syntax, eg
%1$s, %2$s
, and the translator comment above it should be numbered accordingly. Example: https://core.trac.wordpress.org/browser/trunk/src/wp-activate.php?rev=47550&marks=147-148#L139 - The string that's used when neither the required WordPress nor PHP versions are met needs some more clarity to explain that the two version numbers refer to WordPress and PHP respectively.
- I still think that including the current WordPress and/or PHP version number in the messages will help users. They might be more inclined to arrange an update than they would be if they had no idea which version they're currently on.
- The support article at https://wordpress.org/support/update-php/ includes useful information about updating PHP. We should link to this article at the end of this message about updating PHP. There's a useful article on updating WordPress too: https://wordpress.org/support/article/updating-wordpress/.
#7
in reply to:
↑ 5
@
5 years ago
Replying to johnbillion:
- The support article at https://wordpress.org/support/update-php/ includes useful information about updating PHP. We should link to this article at the end of this message about updating PHP. There's a useful article on updating WordPress too: https://wordpress.org/support/article/updating-wordpress/.
@stuffradio please note WP provides wp_get_update_php_url
, a filterable function for the PHP update URL.
You can probably follow this convention that’s already in core.
*I don't believe there's a similar function for updating-wordpress, only instance of that is in this message from core.
#8
@
5 years ago
@stuffradio I recommend waiting to create another patch here until after the next commit on ticket #47656. The Error prefix is supposed to be added back on these messages soon.
#11
follow-up:
↓ 13
@
5 years ago
I pulled the latest code before creating the patch, so I guess that got added to the patch as well.
This ticket was mentioned in Slack in #core by stuffradio. View the logs.
5 years ago
#13
in reply to:
↑ 11
@
5 years ago
- Keywords needs-refresh added
Replying to stuffradio:
I pulled the latest code before creating the patch, so I guess that got added to the patch as well.
Thanks for the patch! There appear to be some formatting issues with it, though. Apparently the IDE replaced all tabs with spaces, so it's very hard to see what was actually changed.
Could you refresh the patch without the formatting changes?
This ticket was mentioned in Slack in #core by stuffradio. View the logs.
5 years ago
#15
@
5 years ago
- Keywords needs-refresh removed
Patch in the linked PR seems to resolve the needed refresh. It is still waiting on tests to run but seems better to me :)
#18
@
5 years ago
- Keywords has-dev-note added
This received a call out in the Miscellaneous Developer Changes in 5.5 dev note: https://make.wordpress.org/core/2020/07/29/miscellaneous-developer-focused-changes-in-wordpress-5-5/.
I added a patch that shows what the required minimum PHP version should be, and I modified the scope so it will also show the minimum required WordPress version as well.