Skip to content Skip to sidebar

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

Problem:
ACF fields that have been deleted are still visible in the backend.

Solution:
This is an ACF issue where deleted fields are not removed from the database, causing WPML to still display them. For a detailed explanation, refer to this post.

If this solution doesn't look relevant to your issue, 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.

This topic contains 5 replies, has 2 voices.

Last updated by lisaH-16 1 year, 8 months ago.

Assisted by: Laura.

Author Posts
November 7, 2023 at 9:12 am #14744959

lisaH-16

Hi there,

1) I have some issues using WPML with ACF Pro. First, some fields I have already deleted are still visible in the backend when editing a page (Screenshot 1).

2) Second, some field are locked when editing the page in the secondary language. Our default language is DE and then we have EN, so two languages. How to unlock these fields? We want to have a different URL for the EN page (Screenshot 1).

For some reason on an other page for URLs it works. And here the fields are not locked. But I have no clue why.

3) How to hide ACF Fields (root fields/ groups) in the translation editor? In the translation editor only the real content which can be translated should be visible (Screenshot 2).

4) Our whole content generally shows the same media files for DE and EN. But in a few cases we need different files. The media should only be replaced if necessary and the same media should be used by default. If there is a case in which a different file is to be used for EN, then it should be possible to replace it. How to make this happen?

I'm looking forward for your message, it's quite urgent, so hopefully you can help here quickly!

Best
Cedric

Screenshot_2.png
Screenshot_1.png
November 7, 2023 at 12:29 pm #14746939

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

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

Hi,

thanks for contacting us.

1. this is an ACF issue, not a WPML one. Fields are saved into the database and when you delete them in the ACF interface, ACF doesn't delete the fields in the database, it just "hides" them. WPML scans the database, and since fields are still present there, WPML will return them for translation. Please refer to this post for a more detailed explanation https://wpml.org/forums/topic/deleted-acf-fields-not-removed-from-translation-editor/#post-5576393

2. URL fields are by default set to copy, and fields set to copy are not visible in the Translation Editor because you can't edit them. Please refer to https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/#pre-set-translation-preferences
If you want to translate the URL fields, you need to use Expert mode - see https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/expert-translation-option/

3. Please check if you have the option "translate media text in the translation editor" checked in WPML > Settings > Media Translation. If so, deactivate it. You'll need to do a change on the original post and send it again for translation before seeing any change.

4. You need to use WPML Media https://wpml.org/documentation/getting-started-guide/media-translation/

November 7, 2023 at 1:23 pm #14747507
lisaH-16

Hi Laura,

Thank you very much for your answer. I will check this later today! We have a big issue right now, after enabling the media translation. We get fatal errors here after enabling this and clicking on "start" for the media translation. Any possibility to revert this or something like that?

Here is an example of some errors:

#21 {main}
thrown in /var/www/vhosts/oui-studios.dev/henrylamotte/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 259
[07-Nov-2023 13:15:16 UTC] PHP Fatal error: Uncaught TypeError: Illegal offset type in isset or empty in /var/www/vhosts/oui-studios.dev/henrylamotte/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php:259
Stack trace:
#0 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php(60): WPML_Element_Translation->maybe_populate_cache()
#1 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(4575): WPML_Element_Translation->element_id_in()
#2 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php(381): SitePress->get_object_id()
#3 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-includes/class-wp-hook.php(310): wpml_object_id_filter()
#4 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#5 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-content/plugins/acfml/classes/class-wpml-acf-attachments.php(29): apply_filters()
#6 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-includes/class-wp-hook.php(312): WPML_ACF_Attachments->load_translated_attachment()
#7 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-includes/plugin.php(256): WP_Hook->apply_filters()
#8 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php(109): apply_filters_ref_array()
#9 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-includes/class-wp-hook.php(310): _acf_apply_hook_variations()
#10 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#11 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php(118): apply_filters()
#12 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-template.php(45): acf_get_value()
#13 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-content/themes/base-theme/template-parts/image-text-header.php(19): get_field()
#14 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-includes/template.php(787): require('...')
#15 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-includes/template.php(720): load_template()
#16 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-includes/general-template.php(206): locate_template()
#17 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-content/themes/base-theme/about-us.php(10): get_template_part()
#18 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-includes/template-loader.php(106): include('...')
#19 /var/www/vhosts/oui-studios.dev/henrylamotte/wp-blog-header.php(19): require_once('...')
#20 /var/www/vhosts/oui-studios.dev/henrylamotte/index.php(17): require('...')
#21 {main}
thrown in /var/www/vhosts/oui-studios.dev/henrylamotte/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 259

Our pages for our default language are still working but for EN version, all pages get a fatal error.

We really looking forward for your help!!

Thanks
Cedric

New threads created by Laura and linked to this one are listed below:

https://wpml.org/forums/topic/uncaught-typeerror-illegal-offset-type-in-isset-or-empty-in-3/

November 7, 2023 at 1:27 pm #14747513

lisaH-16

Here as you can see the current installed add ons:

And the support logs if this helps:

[removed]

Bildschirm­foto 2023-11-07 um 14.25.43.png
November 7, 2023 at 3:30 pm #14749097

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

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

Our policy is "one ticket, one issue", so I split the ticket to take care of the other problem you encountered.

If you don't have any more question regarding our initial request, we can close here.

November 7, 2023 at 3:51 pm #14749583

lisaH-16

Yes, we can close the ticket here to focus on the other one. Are you on the ticket? We can't get any further because of the problem