-
Notifications
You must be signed in to change notification settings - Fork 227
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 #3947: Add a notice on request fail on SAAS server from RUCSS #5240
Fix #3947: Add a notice on request fail on SAAS server from RUCSS #5240
Conversation
@CrochetFeve0251 @piotrbak please find exploratory test notes/Qs below:
WP Rocket: It seems a security plugin or the server's firewall prevents WP Rocket from accessing the Remove Unused CSS generator. The following IP address 135.125.83.227 should be allowlisted:
|
…-fail-RUCSS' into fix/3947-add-a-notice-on-request-fail-RUCSS
|
…-fail-RUCSS' into fix/3947-add-a-notice-on-request-fail-RUCSS # Conflicts: # inc/Engine/Optimization/RUCSS/Admin/Settings.php
For 3. if it doesn't show up that means we didn't done any request and if so it means that we have no way to know if we will have an error. For the me in this case the notice doesn't have to display. For 4. do we need to add custom css if we want a bullet list do we still need to had it. |
…-fail-RUCSS' into fix/3947-add-a-notice-on-request-fail-RUCSS
@CrochetFeve0251 The list without bullets doesn't look good, but we have the same behaviour for all our notices, let's don't change this for now. There's an improvement to do though:
I'll consult wording here and we might change it on the develop though. |
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.
Small enhancements :)
Also, I think we need to add the transient name here:
'wpr_dynamic_lists_delayjs', |
to be removed with plugin uninstallation.
public function has_error_notice() { | ||
return (bool) get_transient( 'wp_rocket_rucss_errors_count' ); | ||
} |
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.
why not moving this method to the settings page and use it inside can_display_notice
method?
This will save you from the above bailouts in methods display_processing_notice
and display_success_notice
.
Also we can move the above bailout in the method display_error_notice
to be inside the settings class also.
What do u think?
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.
@engahmeds3ed For moving that method there an issue. display_error_notice
also use it.
Then yes we could move that logic to the Settings
class.
$reason_2_message = __( "In the server's firewall - your host can help you with this", 'rocket' ); | ||
|
||
$message = sprintf( | ||
// translators: %1$s = plugin name. |
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 don't think this is needed here
Co-authored-by: Rémy Perona <[email protected]>
Co-authored-by: Rémy Perona <[email protected]>
Co-authored-by: Rémy Perona <[email protected]>
If there isn't any used CSS in @piotrbak What do you think?
Is there anything we can/want to do about this?
|
@vmanthos
|
Thank you, @piotrbak! 🙏 @CrochetFeve0251 We should implement item number 3, here: |
@CrochetFeve0251 Thanks for the updates. the transient is deleted now after deleting WPR and the - is added. |
@CrochetFeve0251 Sorry for the wording changes... We'll go with this one: |
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.
Working as expected
testrail-report-502.pdf
Since the requirements have changed, we need the wording to be as follows:
The French doc is here: |
Description
In this PR we had a notice for the user to check if the IP from the SAAS server is authorized when we can't reach it.
For that we did a check on the RUCSS API client and linked a notice to it.
Fixes #3947
Type of change
Is the solution different from the one proposed during the grooming?
No instead of an option I used a transient to ensure it will disappear in the time and not stay for months on the admin from the user.
How Has This Been Tested?
Checklist: