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

Error when saving in editor #534

Closed
troychaplin opened this issue Jun 6, 2024 · 3 comments
Closed

Error when saving in editor #534

troychaplin opened this issue Jun 6, 2024 · 3 comments
Assignees
Labels

Comments

@troychaplin
Copy link

troychaplin commented Jun 6, 2024

Description

I am getting the following error in my server logs when I save any page. I am using WP 6.5.3 in a Gutenberg environment.

PHP Fatal error: Uncaught Error: Call to undefined method Predis\\Connection\\Replication\\SentinelReplication::getParameters() in /server_path/wp-content/object-cache.php:1651
Stack trace:
#0 /server_path/wp-content/object-cache.php(1830): WP_Object_Cache->execute_lua_script()
#1 /server_path/wp-content/object-cache.php(171): WP_Object_Cache->flush_group()
#2 /server_path/wp-content/plugins/wordpress-seo/src/builders/indexable-link-builder.php(710): wp_cache_flush_group()
#3 /server_path/wp-content/plugins/wordpress-seo/src/builders/indexable-link-builder.php(623): Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->update_incoming_links_for_related_indexables()
#4 /server_path/wp-content/plugins/wordpress-seo/src/builders/indexable-link-builder.php(136): Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->update_related_indexables()\n#5 /server_path/wp-content/plugins/wordpress-seo/src/integrat...

I am using Redis Sentinel for caching via predis. I am running PHP 8.0.30. I am using version 2.5.2 of Redis Object Cache. I am using Yoast SEO version 22.8. I can flush the cache using the admin toolbar or wp-cli.

Expected Behavior

The post to save without error

Actual Behavior

Every second attempt at updating I get an error at the top of the editor that says Updating failed. The response is not a value JSON response.

Possible Fix

Maybe related to the discussion happening in GH-528

Steps to Reproduce

  1. Have both plugins mentioned in description active
  2. Edit a page, update. Update again. Error message typically happens every second update. PHP log error displayed with each update attempt.

Additional context

Unable to turn cache on in our production environment

Environment

  • Plugin version: latest redis cache and yoast seo
  • PHP version: 8.0.30
  • WordPress version: 6.5.4
@troychaplin troychaplin added the bug label Jun 6, 2024
@tillkruss tillkruss self-assigned this Jun 10, 2024
@tillkruss
Copy link
Member

@yatsukhnenko Can you try running a group_flush() using Redis Sentinel when using Predis as the client. We may have missed that when we refactored it in 2.5.0.

@tillkruss tillkruss assigned yatsukhnenko and unassigned tillkruss Jun 10, 2024
@tillkruss
Copy link
Member

See #522.

@tillkruss
Copy link
Member

@troychaplin #522 should have fixed this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants