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: Failed Query logs automatically cleared on page refresh #3533

Merged

Conversation

burhandodhy
Copy link
Contributor

@burhandodhy burhandodhy commented Jul 5, 2023

Description of the Change

This PR fixes the issue where the failed query logs are automatically cleared on page refresh. What happened is that the user clicked on the Clear query log button. EP reloads the report page with a nonce in the url. On the next page reload the valid nonce is available in the URL, EP automatically clear the logs. https://github.com/10up/ElasticPress/blob/develop/includes/classes/StatusReport/FailedQueries.php#L134

Closes #

How to test the Change

  1. Run wp elasticpress delete-index command
  2. Go to "Status Report" page.
  3. Click on Clear query log button.
  4. Search anything on the frontend
  5. Refresh the Status Report page and make sure new logs are there.

Changelog Entry

Fixed - Failed Query logs are automatically cleared on refreshing the "Status Report" page

Credits

Props @burhandodhy

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@burhandodhy burhandodhy added this to the 4.6.1 milestone Jul 5, 2023
@felipeelia felipeelia merged commit a5f8ec3 into develop Jul 5, 2023
@felipeelia felipeelia deleted the fix/failed-logs-automatically-clear-on-page-refresh branch July 5, 2023 14:10
felipeelia added a commit that referenced this pull request Jul 5, 2023
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.

2 participants