Home›Support›English Support›[Resolved] ACF Field Group visible in Page Editor after using translation manager
[Resolved] ACF Field Group visible in Page Editor after using translation manager
This thread is resolved. Here is a description of the problem and solution.
Problem: You are using WordPress with the Twenty Twenty-One theme, WPML, and ACF Pro. After translating a page from German to English using the WPML Translation Editor, the 'Navigation' ACF field group remains visible in the editor, regardless of changing its location rule from 'All' to any specific menu location. Solution:
We recommend modifying a specific file within the ACFML plugin to address this issue. Please follow these steps:
go to: wp-content/plugins/acfml/classes/class-wpml-acf-location-rules.php
In the method: \WPML_ACF_Location_Rules::rule_match_post
Change from:
Background of the issue:
I am using a fresh WordPress Installation with the theme Twenty Twenty-One. Plugins: WPML and ACF Pro. I have an ACF field group 'Navigation' with the location rule 'Menu Item' => 'is equal to' => 'All'. I create a new page with a title and click on the plus at English to translate with the WPML Translation Editor from German to English. I leave the translation editor with 'Back' at the top left and return to the German editor.
Symptoms:
The field group 'Navigation' appears below the editor. In ACF, when I change the value item from 'All' to any Menu Location (Primary menu or Secondary menu), the field is still visible. Only if I change it to a specific menu like my 'Mainmenu', the field group disappears in the editor. But back to 'All' or any Menu Location, it is back again.
Questions:
Why is the 'Navigation' field group visible in the editor after using the WPML Translation Editor?
I was able to see the issue while reporting, but strangely the issue is not reproduced anymore, so can you please use this test site and see if the issue exists here: hidden link
thank you for your patience. I was on vacation the last week.
I can reproduce it on your test site!
The problem only occours, when you choose a page title, which is initially *not* in your translation memory. So create a page with a unique title, save as draft, go to translation manager, go back. The fields are now visible, like in my page "Title – not translated via Memory".
Our 2nd tier checked the issue and suggested the following workarround:
Workaround:
go to: wp-content/plugins/acfml/classes/class-wpml-acf-location-rules.php
In the method: \WPML_ACF_Location_Rules::rule_match_post
Change from:
The issue is escalated to developers and they will take a look at this soon. I can't exactly tell when the fix will be released as this depends upon various things.