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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 8:00 – 10:00 | 8:00 – 10:00 | 8:00 – 13:00 | 8:00 – 13:00 | 9:00 – 13:00 | - |
- | 11:00 – 17:00 | 11:00 – 17:00 | 14:00 – 17:00 | 13:00 – 17:00 | 13:00 – 18:00 | - |
Supporter timezone: America/New_York (GMT-05:00)
Tagged: Custom Work, Exception
This topic contains 0 replies, has 0 voices.
Last updated by Lauren 3 days, 13 hours ago.
Assisted by: Lauren.
Author | Posts |
---|---|
February 19, 2025 at 5:04 pm #16726138 | |
timothyB-8 |
Background of the issue: Symptoms: Questions: |
February 20, 2025 at 1:03 pm #16729636 | |
timothyB-8 |
So, with the help of our developer we've turned off our custom theme and are using the default 2023 theme. We've deactivated all plug-ins except WPML and we tried adding the Portuguese with a code of PT (this is something we needed to do in addition to changing our Chinese path to /ZH/), but still got the following error: [20-Feb-2025 10:19:21 UTC] PHP Fatal error: Uncaught Error: Call to undefined method WP_Error::filter() in /nas/content/live/siemondev/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php:189 |
February 20, 2025 at 7:25 pm #16731155 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
Please make sure you are using the latest version of WPML plugins. Go to Plugins -> Add New -> Commercial and click Check for updates and update any as needed. With minimal settings, please be sure to make a full backup of your site and database. Then, go to WPML -> Support -> Troubleshooting. Look for 'Clean up' and click the following: If that does not resolve the issue, I'd like to request credentials so that I can login and take a closer look. The next reply will be marked as private so that you can share login details in the included private fields. |
February 21, 2025 at 4:05 pm #16734528 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
I logged in to the test site and the first thing I saw was the message from WPML asking if the site was a copy or moved. I marked it as a copy, as this banner not being resolved could be related to the error. I then went to WPML -> Languages -> Edit languages and mapped both Chinese languages. I then attempted to add a custom pt language, but got the message that the locale already exists. Sure enough, the standard locale for Portuguese (Portugal) is pt. WPML will not allow you to create a custom language with the same language code that already exists in the database. So you can either create a custom language with something other than pt, or you can use the standard Portuguese (Portugal) language. I was not able to recreate any fatal errors with these steps. Please let me know if there is something else you are doing that is causing the error, and what steps I should take to reproduce it. Thanks! |
February 24, 2025 at 5:29 pm #16742532 | |
timothyB-8 |
Hi Lauren, thanks for your help so far. Okay, focusing on the Simplified Chinese that lives on /zh/ - we get the following warning: ----------------- Chinese (current locale: zh) - suggested locale(s): zh_TW, zh_HK, zh_CN To fix, open "Edit Languages" and set the "default locale" values as shown above. We wanted to be able to create this /zh/ so we can copy all the contents of /zh-hans/ over to it. We are also going to want to be able to use AI translations, so that's a problem. Is there some configuration we missed? Thanks! Tim |
February 25, 2025 at 11:04 pm #16748520 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
I can no longer access the site, so if you can update the previous reply where you shared credentials that would be helpful for me to further troubleshoot. The language mapping is what is used for automatic translation, so as long as it is mapped correctly you should be fine to use the automatic translations. As for the locale, this can be changed any time. Could you use zh_HK for now, then copy all the content over from zh_hans to zh, and then update the locale? The locale is not what shows in the URL, that's the language code that you see in the second column. Please let me know if that works as a workaround for you. |
February 27, 2025 at 9:52 pm #16758335 | |
timothyB-8 |
Hi Lauren, apologies - I've restored your log in to our Dev site. I think we are getting closer. We have the Chinese as we need it (using /zh/). So, I think we're good there. Just a couple other, hopefully minor, issues: 1.) We created a new Portuguese language (so it's using /pt/), however we got an error that auto translations would fail because of the "Default locale". It was just "pt", so we tried "pt_PT" and "pt_BR" and neither worked because it said they already existed. I tried changing it to "pt_AO" and it accepted that. However, we really want to use "pt_BR". Is there a reason why it says they still exist? We only have this one Portuguese language listed. 2.) We have an old Chinese (traditional) language that we deleted quite a while ago. However we get this notice asking if we want to fully delete it - choosing to delete the content does not delete it - it just reappears (see screenshot). It doesn't seem to give an error. Any insights would be appreciated! Tim |
February 28, 2025 at 9:47 pm #16762906 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
Glad the Chinese is working now. As for Portugeuse, the reason it can't be added as a custom language with pt_BR is because it already exists as a standard language, so that locale is already in the database for Portuguese (Brazil). You can simply use the Portuguese (Brazil) standard language but if you want it to be a custom language than you need to use a locale that does not already exist. Here's a list of current codes: hidden link 2. Do you have access to the database to confirm if this content actually exists, or if it's a false message? You can use a plugin such as Adminer to acccess the database or contact your hosting provider. If you find the content in the database, remove the old language entries and let me know if this resolves the issue. If you don't find the content and it's a false error, let me know and we can further troubleshoot. |