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 |
---|---|---|---|---|---|---|
- | - | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 |
- | - | - | - | - | - | - |
Supporter timezone: America/Lima (GMT-05:00)
This topic contains 4 replies, has 0 voices.
Last updated by Boris 1 day, 1 hour ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
January 2, 2025 at 3:46 pm #16559406 | |
Boris |
Background of the issue: Symptoms: Questions: |
January 2, 2025 at 5:21 pm #16559618 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, It looks as if the affected images use a custom ACF field coming from the following addon: Take note, that this plugin's last update about one year ago and it has not been tested with the three latest major updates of WordPress: Take note, that we can not take responsibily for plugins that might not longer be maintained and it is the responsibility of the author for making such addon compatible with WordPress and WPML or other plguins. I will try to recreate the issue now on a test site and see if I can figure out what is causing the issue. Best regards |
January 2, 2025 at 5:47 pm #16559651 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
So far, I can not confirm any issue on my test site. One-Click-Login: Could you please try to recreate the issue on this test site by using the same settings and display method as used on your site? |
January 3, 2025 at 8:46 am #16560451 | |
Boris |
Hi Andreas, |
January 3, 2025 at 9:23 am #16560587 | |
Boris |
What I see on the staging site in a rental CPT English translation is this critical error. Might this have something to do with it? Fatal error: Uncaught TypeError: Cannot access offset of type array in isset or empty in |
January 3, 2025 at 2:02 pm #16561591 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Please make use of the private reply form and provide me admin access to the staging site for running further tests. The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it. IMPORTANT If you cannot see the "wp-admin / FTP" fields, your post and website login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields. The private reply form looks like this: Next time you reply, click "I still need assistance". Video: Please note that we are required to request this information individually on each ticket. We are not allowed to access access information that was not specifically submitted on this ticket in the private reply form. |
January 3, 2025 at 3:44 pm #16561953 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
There are various updates available on your site (theme, plugins). Could you please make sure to run those updates and confirm if the issue persists before we continue testing? Also, you will need to enable ACF PRO on the site. I am not able to review and edit the fields without having a active ACF PRO licence. |
January 3, 2025 at 4:19 pm #16562033 | |
Boris |
Hi Andreas, |
January 3, 2025 at 5:37 pm #16562298 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
I imported your CPT and the ACF Field Groups to my sandbox but I still can not confirm the same issue here. I can see the error on your site when trying to edit a translated CPT on the WordPress Editor, too. I would like to take a local copy of your site for further testing, if you agree? |
January 4, 2025 at 1:24 am #16562726 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
The reason for the error appears to be that a Flexible Content Field in ACF was set to "Translate" and you then corrupted the data on your translated CPTs. The Flexible Content Field should always be set to "Copy once" when translating with the WordPress Editor. I suggest you set the ACF Field Groups that are used on your CPTs to "Different fields across languages". This is the recommended setting for translations made with the WordPress Editor and you will notneed to configure each field individually. The only way I yet found to solve the issue at this moment would be to delete the translated CPTs and translate them again. If this is not an acceptable solution for you, the only way to solve the issue would be to investigate the wp_posts and wp_postmeta database tables and figure out which field's translations are causing the errors. The issue does not occur on newly created CPTs if you use the recommended setting for the field groups. |
January 4, 2025 at 10:50 am #16563126 | |
Boris |
Yes, by all means - you can make a local copy. Regarding your findings: I cannot ask my client to re-translate all rentals. That would take them a week of work. I will see if I can find anything in the database regarding the errors. Perhaps I can solve it that way. But the main issue is not with the error, the issue is with the media not showing on the translated pages/rentals. Please focus on that. Thanks for your help so far! |
January 4, 2025 at 9:07 pm #16563831 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
My apologies, but as the translated data got corrupted I did not yet find a better solution. The issues seems to be related to the "Flexible Content" fields. As there are many groups invovled it is very hard to figure out what went wrong. The issue could even be related to a field that is part of a Flexible Content. I realized that quiet many fields that should have been set to "Copy once" where set to "Translate". WPML saves all translations on wp_posts and wp_postmeta. I would suggest checking for the IDs of those fields on wp-postmeta and making sure that all translated entries use the same value as the original field's entries. --- About the media: IMPORTANT: The issue might be, that you are using here arrays with IDs and the media attachements in a second language would use a different ID. --- About the local copy: Sadly the local copy that I took from your site is not working as expected. If I create a new post the images do not even show up on the original content. All translated posts are falling back to a a different template as well. |
January 6, 2025 at 8:18 am #16565270 | |
Boris |
Hi Andreas, As for the media: He asked me to clarify some things about those fields, to help him find the best way to address this issue. I don't know what he wanted to know about it, that's why I requested the ticket be re-opened. |