Skip to content Skip to sidebar

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 2 replies, has 0 voices.

Last updated by alexandreP-37 3 days, 8 hours ago.

Assisted by: Dražen.

Author Posts
November 17, 2025 at 1:51 pm #17584366

alexandreP-37

Background of the issue:
I am trying to resolve an error related to Redis that appears frequently in my server logs. The error occurs on the route /wp-json/wpml/tm/v1/ate/jobs/download, which is controlled by WPML. The error message is: Error at /var/www/html/web/app/object-cache.php at line 2668 'Trying to clone an uncloneable object of class Redis'. The solution involves modifying the __clone() method of the class containing the Redis object to either recreate a new Redis connection or set the Redis property to null during cloning. Here is the code snippet I am considering: ```php public function __clone() { if (isset($this->redis) && $this->redis instanceof Redis) { $this->redis = new Redis(); if ($this->connected) { $this->redis->connect($this->server, $this->port, $this->timeout); if (!empty($this->password)) { $this->redis->auth($this->password); } if (isset($this->database)) { $this->redis->select($this->database); } } } } ```

Symptoms:
I am encountering a 500 error due to a 'Trying to clone an uncloneable object of class Redis' message in the server logs.
Since it's related to WPML and to the Redis Cache plugin, I've also shared the bug to their github repository: hidden link Feel free to discuss it there if you prefer.

Questions:
How can I prevent the 'Trying to clone an uncloneable object of class Redis' error?

November 17, 2025 at 2:00 pm #17584400

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Here is the ticket—let’s continue the discussion here.

1) Are there any specific steps that consistently trigger the issue, such as re-translating certain content or performing another particular action?

2) Since you have already reported this to the Redis team and the fix involves modifying their code, let’s wait for their feedback. They will likely have more insight into why this is happening, what may be causing it, and whether it could be related to anything on the WPML side.

Please let me know how it goes.

Thank you,
Drazen

November 19, 2025 at 1:41 pm #17592059

alexandreP-37

Thank you , I will mark this as resolved for now

November 19, 2025 at 1:41 pm #17592061

alexandreP-37

wontfix for now