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

BUG: Stats.php error in Admin UX Only #3729

Closed
1 task done
pvnanini opened this issue Oct 27, 2023 · 5 comments · Fixed by #3776
Closed
1 task done

BUG: Stats.php error in Admin UX Only #3729

pvnanini opened this issue Oct 27, 2023 · 5 comments · Fixed by #3776
Assignees
Labels
bug Something isn't working
Milestone

Comments

@pvnanini
Copy link

Describe the bug

When I want to change some features or settings in the plugin, I get this error message.

I allready have tried deactivating all plugins and switching to the official theme with no results.

A point to mention is, if I run "wp elasticpress stats" woks without problems.

Steps to Reproduce

Go to admin panel and click on Elasticpress Features or Settings then the error will be shown

Run wp elasticpress stats and there is no error

Screenshots, screen recording, code snippet

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home/customer/www/xxxxxx/public_html/wp-content/plugins/elasticpress/includes/classes/Stats.php:158 Stack trace: #0 [internal function]: ElasticPress\Stats->ElasticPress{closure}('797bcdab-f69b-4...') #1 /home/customer/www/xxxxxx/public_html/wp-content/plugins/elasticpress/includes/classes/Stats.php(155): array_filter(Array, Object(Closure)) #2 /home/customer/www/xxxxxx/public_html/wp-content/plugins/elasticpress/includes/classes/Stats.php(116): ElasticPress\Stats->populate_indices_stats() #3 /home/customer/www/xxxxxx/public_html/wp-content/plugins/elasticpress/includes/classes/Stats.php(250): ElasticPress\Stats->build_stats() #4 /home/customer/www/xxxxxx/public_html/wp-content/plugins/elasticpress/includes/classes/AdminNotices.php(726): ElasticPress\Stats->get_nodes() #5 [internal function]: ElasticPress\AdminNotices->process_yellow_health_notice() #6 /home/customer/www/xxxxxx/public_html/wp-content/plugins/elasticpress/includes/classes/AdminNotices.php(67): call_user_func(Array) #7 /home/customer/www/xxxxxx/public_html/wp-content/plugins/elasticpress/includes/dashboard.php(329): ElasticPress\AdminNotices->process_notices() #8 /home/customer/www/xxxxxx/public_html/wp-includes/class-wp-hook.php(310): ElasticPress\Dashboard\maybe_notice('') #9 /home/customer/www/xxxxxx/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) #10 /home/customer/www/xxxxxx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #11 /home/customer/www/xxxxxx/public_html/wp-admin/admin-header.php(303): do_action('admin_notices') #12 /home/customer/www/xxxxxx/public_html/wp-admin/admin.php(239): require_once('/home/customer/...') #13 {main} thrown in /home/customer/www/xxxxxx/public_html/wp-content/plugins/elasticpress/includes/classes/Stats.php on line 158

Environment information

No response

WordPress and ElasticPress information

`

wp-core

version: 6.3.2
site_language: es_ES
user_language: es_ES
timezone: -03:00
permalink: /%postname%/
https_status: true
multisite: true
user_registration: true
blog_public: 1
default_comment_status: closed
environment_type: production
site_count: 3
network_count: 1
user_count: 5
dotorg_communication: true

wp-dropins (1)

object-cache.php: true

wp-active-theme

name: Astra-Child (astra-child)
version: 3.3.3
author: Astra Child
author_website: http://wpastra.com/about/
parent_theme: Astra (astra)
theme_features: core-block-patterns, astra_hooks, widgets-block-editor, align-wide, automatic-feed-links, title-tag, post-thumbnails, starter-content, html5, post-formats, custom-logo, customize-selective-refresh-widgets, editor-style, woocommerce, amp, editor-color-palette, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, web-stories, widgets, menus
theme_path: /home/customer/www/xxxxx/public_html/wp-content/themes/astra-child
auto_update: Desactivado

wp-parent-theme

name: Astra (astra)
version: 4.4.0
author: Brainstorm Force
author_website: https://wpastra.com/about/?utm_source=theme_preview&utm_medium=author_link&utm_campaign=astra_theme
theme_path: /home/customer/www/xxxxxx/public_html/wp-content/themes/astra
auto_update: Desactivado

wp-themes-inactive (3)

Spectra One: version: 1.0.6, author: Brainstorm Force, Actualizaciones automáticas desactivadas
Storefront: version: 4.5.3, author: Automattic, Actualizaciones automáticas desactivadas
Twenty Twenty-Three: version: 1.2, author: el equipo de WordPress, Actualizaciones automáticas desactivadas

wp-mu-plugins (1)

Health Check Troubleshooting Mode: author: (undefined), version: 1.9.1

wp-plugins-active (23)

Code Snippets: version: 3.5.0, author: Code Snippets Pro, Actualizaciones automáticas desactivadas
ElasticPress: version: 4.7.2, author: 10up, Actualizaciones automáticas desactivadas
EWWW Image Optimizer: version: 7.2.1, author: Exactly WWW, Actualizaciones automáticas desactivadas
GTM4WP: version: 1.18.1, author: Thomas Geiger, Actualizaciones automáticas desactivadas
Hippoo!: version: 1.3.2, author: Hippoo team, Actualizaciones automáticas desactivadas
HubSpot All-In-One Marketing - Forms, Popups, Live Chat: version: 10.2.5, author: HubSpot, Actualizaciones automáticas desactivadas
Instant Indexing: version: 1.1.17, author: Rank Math, Actualizaciones automáticas desactivadas
Mercado Pago payments for WooCommerce: version: 6.9.3, author: Mercado Pago, Actualizaciones automáticas desactivadas
MWB HubSpot for WooCommerce: version: 1.5.1, author: MakeWebBetter, Actualizaciones automáticas desactivadas
PDF Invoices & Packing Slips for WooCommerce: version: 3.7.1, author: WP Overnight, Actualizaciones automáticas desactivadas
QR Code Tag for WC order emails, POS receipt emails, PDF invoices, PDF packing slips, Blog posts, Custom post types and Pages (from goaskle.com): version: 1.9.28, author: Goaskle.com, Actualizaciones automáticas desactivadas
Rank Math SEO: version: 1.0.204, author: Rank Math, Actualizaciones automáticas desactivadas
Security Optimizer: version: 1.4.7, author: SiteGround, Actualizaciones automáticas desactivadas
Spectra: version: 2.9.0, author: Brainstorm Force, Actualizaciones automáticas desactivadas
Speed Optimizer: version: 7.4.3, author: SiteGround, Actualizaciones automáticas desactivadas
Super Page Cache for Cloudflare: version: 4.7.4, author: Optimole, Actualizaciones automáticas desactivadas
TeraWallet: version: 1.4.9, author: StandaloneTech, Actualizaciones automáticas desactivadas
Tidio Chat: version: 6.0.11, author: Tidio Ltd., Actualizaciones automáticas desactivadas
TranslatePress - Multilingual: version: 2.6.4, author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban, Actualizaciones automáticas desactivadas
Web Stories: version: 1.34.0, author: Google, Actualizaciones automáticas desactivadas
WooCommerce: version: 8.2.1, author: Automattic, Actualizaciones automáticas desactivadas
WP Delicious: version: 1.5.5, author: WP Delicious, Actualizaciones automáticas desactivadas
WP Mail SMTP: version: 3.9.0, author: WP Mail SMTP, Actualizaciones automáticas desactivadas

wp-server

server_architecture: Linux 3.12.18-clouder0 x86_64
httpd_software: Apache
php_version: 8.2.11 64bit
php_sapi: apache2handler
max_input_variables: 3000
time_limit: 600
memory_limit: 2048M
max_input_time: 120
upload_max_filesize: 256M
php_post_max_size: 256M
curl_version: 7.85.0 OpenSSL/3.0.9
suhosin: false
imagick_availability: false
pretty_permalinks: true
htaccess_extra_rules: true
current: 2023-10-27T14:11:53+00:00
utc-time: Friday, 27-Oct-23 14:11:53 UTC
server-time: 2023-10-27T11:11:52-03:00

wp-database

extension: mysqli
server_version: 5.7.39-42-log
client_version: mysqlnd 8.2.11
max_allowed_packet: 33554432
max_connections: 500

wp-constants

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /home/customer/www/xxxxxxxxxx/public_html/wp-content
WP_PLUGIN_DIR: /home/customer/www/xxxxxxxxxxx/public_html/wp-content/plugins
WP_MEMORY_LIMIT: 2048M
WP_MAX_MEMORY_LIMIT: 2048M
WP_DEBUG: false
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Sin definir
WP_DEVELOPMENT_MODE: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

wp-filesystem

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable

ep-last-sync

method: WP Dashboard
is_full_sync: Yes
start_date_time: 2023/10/27 10:50:03 am
end_date_time: 2023/10/27 10:50:10 am
total_time: 0 horas, 0 minutos, 7 segundos
total: 54
synced: 54
skipped: undefined
failed: undefined
errors:

Code of Conduct

  • I agree to follow this project's Code of Conduct
@pvnanini pvnanini added the bug Something isn't working label Oct 27, 2023
@felipeelia
Copy link
Member

@pvnanini is this still a problem if you update to ElasticPress 5.0?

@pvnanini
Copy link
Author

pvnanini commented Nov 6, 2023

Hi @felipeelia yes indeed, I'm working with the last Elasticpress version 5.0 and the error is still here

@felipeelia
Copy link
Member

Thanks @pvnanini. Can you please run wp elasticpress request _cat/indices?format=json --pretty in your terminal and let us know the return? That should give you a list of all indices in a JSON, but it is probably failing for some reason.

@pvnanini
Copy link
Author

pvnanini commented Nov 15, 2023 via email

@felipeelia
Copy link
Member

Hi @pvnanini, okay, that clarifies it. You don't have permission to list all indices, so ElasticPress doesn't get the response it needs to build that page.

I'll keep this issue open so we can consider adding a warning about that fact, but in the meanwhile, you should work with your ES hosting company so your user can have enough permissions.

@felipeelia felipeelia added this to the 5.1.0 milestone Nov 20, 2023
@felipeelia felipeelia modified the milestones: 5.1.0, 5.0.1 Nov 29, 2023
@felipeelia felipeelia self-assigned this Nov 29, 2023
@burhandodhy burhandodhy assigned felipeelia and unassigned burhandodhy Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants