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

Fix: Sync interruption message always mentions ElasticPress.io #2813

Merged
merged 2 commits into from
Jun 20, 2022

Conversation

burhandodhy
Copy link
Contributor

Description of the Change

This PR fixes the the issue where the Sync interruption messages always show ElasticPress.io regardless of host settings. The issue was when Utils\is_epio() returns 0 , wp_localize_script convert it into string '0' and in JS if ( '0' ) gives true .

With the use of FILTER_VALIDATE_BOOLEAN is_epio returns empty in case of false and 1 if the value is true.

Closes #2784

Verification Process

  • Start a delete and sync from the sync page.
  • Run wp elasticpress stop-indexing
  • Click Show log and review the message.
  • The message would have Your indexing process has been stopped by WP-CLI and your Elasticsearch index could be missing content incase of self hosted ElasticSearch

Changelog Entry

Fixed: Sync interruption message always mentions ElasticPress.io

Credits

Props @burhandodhy

@felipeelia felipeelia self-assigned this Jun 7, 2022
@felipeelia felipeelia added this to the 4.2.1 milestone Jun 7, 2022
@felipeelia felipeelia self-requested a review June 20, 2022 13:28
@felipeelia felipeelia merged commit 4b09304 into develop Jun 20, 2022
@felipeelia felipeelia deleted the fix/2784 branch June 20, 2022 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync interruption message mentions ElasticPress.io regardless of Elasticsearch host
2 participants