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 11 replies, has 3 voices.

Last updated by Raja Mohammed 4 months, 3 weeks ago.

Assigned support staff: Raja Mohammed.

Author Posts
April 15, 2019 at 12:40 am #3608891

richardH-41

I am trying to:
View an options page related to the selected translation.

Link to a page where the issue can be seen:
Internal WP-ADMIN

I expected to see:
The options page for that translation.

Instead, I got:
The options page for english.

Changed in v1.2 (works in v1.1)
This is a change in v1.2 related to the maybe_remove_language_code method in classes/class-wpml-acf-options-page.php

By removing the filter or returning the $post_id before the logical statement, the issue no longer presents itself and I can then edit the options for that selected translation.

Looking at the logic, it essentially resets the post_id to "options" every time - I don't know what the intention of this method is. Maybe check the profile setting of editing language?

Whatever the intention is, it breaks option based admin pages when I need to do language specific changes.

April 15, 2019 at 11:23 am #3612987

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi there,

Welcome to our forum,

Please try reproducing the issue in a fresh sandbox installation
hidden link

You can log in to the fresh install using the above link. I have WPML plugins and ACFML installed, please activate and complete the setup. You might need to install ACF pro to the installation.

This is the best and fastest way to identify the issue and escalate it to the developers.

Let me know once it is done.

Kind regards
Raja

April 16, 2019 at 12:24 am #3617051

richardH-41

I've added ACF Pro, created a custom field group and applied it to the Options menu item.

I've added the French language.

This field group is set to "Do not make 'Field Groups' translatable". I only want to one field group - not have it created in each translation - but store the the content values saved against the field group for each translation (possible pre v1.2).

I use ACF php configuration in our site - but I've done this one via the ACF config tool (and produces the same issue).

Likely, what needs to be fixed is that the Multilinugual content setup option (bottom of field group config) needs to be checked in the "maybe_remove_language_code" method - such that the default selected option (in this example) needs to not adjust the $post_id value, but adjust when the other two options are selected?

April 16, 2019 at 5:42 am #3618297

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

HI there,

Thanks for your efforts,

I have checked the internal document and the change log, With ACF version 1.2 the options page can be translated from WPML > String Translation. This allows the front end display of translation to be effective. I have added string translation to the sandbox site and verified the same.

The string is registered under the domain "ACF options" Check attached screenshot.

I hope this helps you better.

Kind regards
Raja

April 16, 2019 at 5:51 am #3618325

richardH-41

The value is the issue. Not the translation.

You have updated it to "Test FR" but now that value is appearing when viewing the options page in English. It's saving the value once, instead of per translation.

(and this is because the method returns $post_id as "option" instead of "option_fr" / "option_en"/"option"). These values need to be per language, not stored as once and used for each translation)

April 16, 2019 at 12:17 pm #3621891

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi there,

I think I was not clear, Kindly apologize for the miscommunication.

The Options values from ACFML 1.2 can only be translated from WPML > String Translation. You cannot see the change in the options page backend, It will display the default value when you switch languages.

However, Since the method return, "option" the filtering is done through String translation and translations are applied from the string translation table when the page is rendered in the front end

Please note The only way to translate ACF option page values is from String translation alone, This means the ACF options page is no longer translated by changing the language of the page.

I hope it is clear now. Let me know if you need further assistance.

Kind regards
Raja

April 16, 2019 at 12:39 pm #3622117

richardH-41

I'm sorry, but that is just not workable.

ACF is used for more than just text entry. For example, we use the options page with various repeaters and various input options - such as boolean values and single/multi-selectable values. Our various translations have different navigation which is driven by ACF option pages - and currently this change makes that no longer possible (when it was working just fine in v1.1)

The change here, completely breaks all of this - leaving me with the only option to drop this plugin into my own repo to manage.

Can we at least add an option that makes this optional? Because everything works just fine by disabling this new method.

Because it makes no sense the way you have approached this, and no doubt, many other customers could be having this similar issue.

Please refer this request to someone that understands ACF use cases?

April 16, 2019 at 1:48 pm #3622573

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi there,

I have escalated your request to the second tier for better clarification, I will get back to you with the updates from them.

Kind regards
Raja

April 17, 2019 at 1:51 pm #3631461

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi there,

I have received an update from our developer Konrad author of ACFML,
Unfortunately, the older way of translating options pages is not possible anymore, Translation of ACFML can only be done from String Translation.

However, we are working towards adapting complex ACF options page translation. The development is in progress I will let you know with the updates once I hear from our developer.

I would request your patience in this regard.

Kind regards
Raja

April 19, 2019 at 5:19 pm #3647727

Pieter

Joining this ticket from https://wpml.org/forums/topic/previously-working-translations-fall-apart-when-new-language-is-added/

The changelog of ACFML 1.2 says nothing about breaking existing ACF Options translations and says that options now CAN be done via String Translation.

It should have said MUST and it should have included a fail safe for sites where things were working just fine.

It is one thing that you fix something that isn't broken and/or improve something that does not need improving and don't test that in real world scenarios, but not adding the correct information anything about these changes to the Changelog is simply irresponsible!

From https://wpml.org/download/acfml/?section=changelog
April 10, 2019
Fixed an issue with serialized galleries not being displayed.
Fixed a fatal error call to undefined function acf_maybe_get_POST().
Fixed issues with umlauts saved incorrectly.
Fixed relationship fields not copying to translation when there are more than one related items.
Changed the last parameter of the WPML_ACF_Field_Settings::field_value_updated() function to be optional.
Added the GNU GPL license file.
Fixed the translating ACF Options page (it can now be done using WPML String Translation).
Fixed a fatal error that occurred when saving the page/product.

What happened to QA guys?

May 6, 2019 at 10:39 am #3747117

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi there,

Just got an update from the developers, We are rolling back to older way fo translating the ACF options page. The rollback will be available in the next version of ACFML 1.3.

Kindly apologize for the inconvenience. Thanks for your patience and cooperation

Kind regards
Raja

May 28, 2019 at 7:33 am #3903523

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Issue resolved with new update ACFML 1.3