-
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
Block Directory: Improve Errors and related experience when installing a block. #23733
Comments
Have we considered rendering the error messages as HTML? The plugin incompatibilities would be particularly tricky to implement client side, especially because of the update PHP annotations. |
Can you offer some examples for more context? |
Yep here's an example. Ignore the actual numbers :) <p>
<strong>Error:</strong> Current PHP version (7.1.4) does not meet minimum requirements for WooCommerce. The plugin requires PHP 7.0.
</p>
<p>
<a href="https://wordpress.org/support/update-php/">Learn more about updating PHP</a>.
</p> It can also be like this if the hosting company provides their own custom page. <p>
<strong>Error:</strong> Current PHP version (7.1.4) does not meet minimum requirements for WooCommerce. The plugin requires PHP 7.0.
</p>
<p>
<a href="https://example.org/my-custom-page">Learn more about updating PHP</a>.
</p>
<p>
<em>This resource is provided by your web host, and is specific to your site. For more information, <a href="https://wordpress.org/support/update-php/" target="_blank">see the official WordPress documentation</a>.</em></p> So to make that error message we need their current PHP version and the URLs for updating the PHP version and then have to keep the actual language in sync between WordPress Core and Gutenberg. The issue from my perspective is that it is common for WordPress error messages to have HTML in them. And I think there are far too many messages, some of which are complex, to natively implement client side. Not to mention a lot of the times a custom error can be returned by plugins, so we couldn't possibly account for them. |
We can use |
I think it should be fine since those errors' HTML would typically be printed as is in the admin currently. |
This is outdated since UI updates were made in #25521. Let's close this ticket and reopen a new one should we need fixes. |
Is your feature request related to a problem? Please describe.
The Block Directory package, in combination with the Plugin API, could provide much better error handling when installing a block.
There are two areas that need improvement:
Improving Error Messaging
We currently display error messages that are thrown from the Plugin API. This is awkward because some errors have html included. For example this error is thrown when there is an issue with the PHP version & the block:
The html is rendered as a string and not proper html.
We should intercept these errors and translate them to be more user friendly.
Options:
Improving User Experience
There are 3 different actions we can provide to users:
retry
buttonreload
button (which reloads the page)There are also 3 main error scenarios that can arise during a block's installation:
HTTP issues
Retry
300/400
level503
504
Fatal
500
levelIssues with installing server-side
Reload
unable_to_connect_to_filesystem
folder_exists
Fatal
plugin_wp_php_incompatible
plugin_wp_incompatible
plugin_php_incompatible
rest_cannot_manage_plugins
rest_plugin_not_found
rest_cannot_install_plugin
rest_cannot_activate_plugin
unable_to_determine_installed_plugin
I'm sure there are plenty more missing.
Next Steps
The text was updated successfully, but these errors were encountered: