-
Notifications
You must be signed in to change notification settings - Fork 314
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: Notice: Undefined index: server_type in /var/www/html/wp-content/plugins/elasticpress/includes/classes/Elasticsearch.php on line 1322 #3063
Comments
Hi @knyttl , It would be great if you could give more details about this, there's a couple of places where that gets defined, but it should be always defined as a property as you can see here: https://github.com/10up/ElasticPress/blob/develop/includes/classes/Elasticsearch.php#L52 Ans just to make sure you are not using this filter, correct ? https://github.com/10up/ElasticPress/blob/develop/includes/classes/Elasticsearch.php#L249 Thanks! |
Hi, honestly I have no idea. This happens on my fresh installation and I never touch the variable.
No I don't use it. It is just a fresh run of the plugin. Is there a way to set this variable so that the error disappears? |
Hi @knyttl, Can you please go to the Settings page, save it again, and check if the error is gone? Probably not related but your WordPress version does not match our minimum requirement (currently WP 5.6.), is it possible for you to test it against a newer version? Thanks |
I seems that the error disappeared over the weekend. I haven't done anything at all, so nevermind 🤦 Closing 👍 |
Seeing this as well, looks like the bug was likely introduced in #2835 when the info is pulled from transient data and the data was written from a previous version without the https://github.com/10up/ElasticPress/blob/4.3.0/includes/classes/Elasticsearch.php#L1313-L1325 can we reopen this @felipeelia ? |
@andyblackwell, the upgrade routine should delete that transient for previous versions here. Are you using object cache by any chance? We will need to determine why and in which scenarios the deletion of that transient is not happening properly. |
yes, we are using object cache via https://objectcache.pro/ installed as an mu plugin |
Hey @andyblackwell, did you upgrade this site before and then downgrade it? That would explain why that code was not called. Also, are you continuously getting that warning, or was it just a 1-time thing? |
was just a one time notice on the first load after upgrading, and no upgrade/downgrade, though after this conversation I reset the site several times to test, and it does seem to be something with object cache as you alluded to |
Describe the bug
This is not really bug, but annoying warning if you have all the logging on:
Notice: Undefined index: server_type in /var/www/html/wp-content/plugins/elasticpress/includes/classes/Elasticsearch.php on line 1322
Steps to Reproduce
I am not sure why this happens on my instance. Maybe there needs to be some additional erorr handling,
Expected behavior
Ideally such messages should be hidden.
Environment information
The text was updated successfully, but these errors were encountered: