Skip to content
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

Add a warning when Cloudflare blocks REST API requests #8640

Merged
merged 14 commits into from
Aug 8, 2018
Merged
Prev Previous commit
Next Next commit
Linting.
  • Loading branch information
pento committed Aug 7, 2018
commit d41f6582093d8ba8cc3b60f946bf41295d0be44b
4 changes: 2 additions & 2 deletions lib/compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ function gutenberg_warn_classic_about_cloudflare() {
<li><?php _e( 'If you have a Cloudflare Pro account, login to Cloudflare, visit the Firewall settings page, open the "Cloudflare Rule Set" details, open the "Cloudflare WordPress" ruleset, then set the rules "WP0025A" and "WP0025A" to "Disable".', 'gutenberg' ); ?></li>
Copy link
Member

@gziolo gziolo Aug 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"WP0025A" and "WP0025A" - the same id is listed twice.

If I follow the description of the PR right, it should be "WP0025A" and "WP0025B"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

<li>
<?php
/* translators: link to a comment in the Gutenberg repo */
printf(
/* translators: link to a comment in the Gutenberg repo */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be /* translators: %s: link to a comment in the Gutenberg GitHub repository */

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

__( 'For free Cloudflare accounts, you can <a href="%s">change the REST API URL</a>, to avoid triggering the WAF rules. Please be aware that this may cause issues with other plugins that use the REST API, and removes any other protection Cloudflare may be offering for the REST API.', 'gutenberg' ),
'https://github.com/WordPress/gutenberg/issues/2704#issuecomment-410582252'
);
Expand All @@ -378,8 +378,8 @@ function gutenberg_warn_classic_about_cloudflare() {
</ul>
<p>
<?php
/* translators: link to an issue in the Gutenberg repo */
printf(
/* translators: link to an issue in the Gutenberg repo */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again missing the %s in the comment + I wouldn't shorten repository here.

/* translators: %s: link to an issue in the Gutenberg GitHub repository */

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

__( 'If neither of these options are possible for you, please <a href="%s">follow this issue for updates</a>. We hope to have this issue rectifed soon!', 'gutenberg' ),
'https://github.com/WordPress/gutenberg/issues/2704'
);
Expand Down