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

Status Report Page #3130

Merged
merged 70 commits into from
Nov 21, 2022
Merged

Status Report Page #3130

merged 70 commits into from
Nov 21, 2022

Conversation

felipeelia
Copy link
Member

@felipeelia felipeelia commented Nov 11, 2022

Description of the Change

This PR improves debugging and also adds a new "Status Report" page in the dashboard

Closes #3077

How to test the Change

To-Do

  • Unit Tests
    • process_too_many_fields_notice method
    • ep_update_index_settings action
    • get_index_total_fields_limit method
    • get_distinct_meta_field_keys_db method
    • get_distinct_meta_field_keys_db_per_post_type method
    • get_indexable_meta_keys_per_post_type method
  • Copy Review
    • process_too_many_fields_notice (warning, "You may have...")
    • process_too_many_fields_notice (error, "You definitely have...")
    • Meta Keys (Limited): "Due to the number of posts on the site, the result set per post type is limited."
  • Visual
    • Status Report Page (general alignment, etc.)
  • Fix
    • Last Sync info (totals vs. synced with more than one indexable)
  • List post content related reports (post count and meta) per site in multisite installations

Changelog Entry

Added - New Status Report page.

Credits

Props @felipeelia, @brandwaffle

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.

@felipeelia felipeelia added this to the 4.4.0 milestone Nov 11, 2022
@felipeelia felipeelia changed the title Make info "not-private" and adjust add_filter call Status Report Page Nov 15, 2022
includes/classes/AdminNotices.php Outdated Show resolved Hide resolved
*/
public function get_cluster_indices() {
$path = '_cat/indices?format=json';

$response = $this->remote_request( $path );

return $response;
return json_decode( wp_remote_retrieve_body( $response ), true );
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might need some more error handling and casting to ensure it is not causing any errors in case of unexpected results.

Copy link
Member Author

Choose a reason for hiding this comment

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

Casting added in 4258eda. Regarding error handling, do you have any specific scenario in mind @tott? So far, I'm relying on the underlying functions:

  • If $response is an error, wp_remote_retrieve_body will return an empty string
  • If json_decode fails, it will return null
    Thanks!

includes/classes/Indexable/Post/Post.php Outdated Show resolved Hide resolved
@felipeelia
Copy link
Member Author

This link contains a preview of the page: https://imgur.com/4F1UQMZ

@felipeelia felipeelia mentioned this pull request Nov 17, 2022
4 tasks
@felipeelia felipeelia merged commit bcbfbf2 into develop Nov 21, 2022
@felipeelia felipeelia deleted the feature/addl-debug-info branch November 21, 2022 13:12
@JakePT JakePT mentioned this pull request Nov 23, 2022
4 tasks
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.

Better Debugging and Status Report
3 participants