Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing a WordPress database error indicating a duplicate entry for key 'uc_domain_name_context_md5' when editing a custom post type item in a bilingual site managed with WPML.

Solution:
We resolved the issue by removing the problematic row with the value '0dde19c51f7721e38b1cae83d85e3a66' in the 'uc_domain_name_context_md5' from the 'icl_strings' table, which contained an invalid string. After clearing and disabling caches, the problem did not recur.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

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.

Tagged: 

This topic contains 1 replies, has 2 voices.

Last updated by Waqas Bin Hasan 8 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
October 4, 2024 at 6:36 am

efthimiosM

Background of the issue:
I am reopening this ticket because the previous one was closed due to inactivity (???) even though I had just posted it.

I am managing a site with two languages, English and Greek, using WPML. Whenever we edit a custom post type item we get a wordpress database error on the top of the page.

Wordpress database error: [Duplicate entry '0dde19c51f7721e38b1cae83d85e3a66' for key 'uc_domain_name_context_md5']
UPDATE icl_strings SET name = 'group identity-area-2 name', domain_name_context_md5 = md5( CONCAT( context, name, gettext_context ) ) WHERE name = 'group 32 name'

We are working on a staging environment and we have access to the database. We have updated WPML and tried troubleshooting options like clearing cache and assigning translation status to duplicated content but problem persists.

Symptoms:
WordPress database error: [Duplicate entry '0dde19c51f7721e38b1cae83d85e3a66' for key 'uc_domain_name_context_md5'] occurs whenever I open the edit page of a custom post type item.

Questions:
Is there a way to find out what causes this database error and fix it?

October 4, 2024 at 7:02 am
October 4, 2024 at 7:25 am #16252683

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Reference to our recent chat, the issue has been resolved.

I removed the row having "0dde19c51f7721e38b1cae83d85e3a66" value in "uc_domain_name_context_md5" from "icl_strings" table. There seem to be an invalid string.

After that I've activated all your plugins and have switched to your child theme. I also created some test entries in Library Items and the other related custom post types and translated these.

Perhaps there was a temporary glitch which was recreating the same hash. This may happen due to the cache. You can try clearing and disabling caches in this case and check again.

However for now it seems to work fine again.

Regards.