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 8 replies, has 2 voices.

Last updated by Diego Pereira 1 year ago.

Assigned support staff: Diego Pereira.

Author Posts
September 19, 2018 at 5:58 pm #2749735

carecweb

Apparently, there are some serious bugs in custom field translation upon further tests.

Fields which were not originally included in the translation editor (since they were originally defined as Copy or Copy once) will never be shown in the translation editor even if they were changed to "Translate" and their original values updated.

Besides, even those fields started and left as "Copy Once", those fields should be included in the translation editor since by definition, they can be subsequently changed from their original value (copied from original post).

Which brings me to my earlier post that due to these bugs (this one and Show Differences), the users must be 100% certain of the setting of each field before creating a translation.

Please fix immediately.

September 19, 2018 at 6:02 pm #2749740

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there, feedback below:

--- Fields which were not originally included in the translation editor (since they were originally defined as Copy or Copy once) will never be shown in the translation editor even if they were changed to "Translate" and their original values updated.
To display a "content" field (like text or WYSIWYG fields), you should do the following:
- Go to the edit screen of the page (original language)
- Scroll down to Multilingual Content Setup
- Set the field to "Translatable" and click on APPLY
- Do a small modification on the content and save
- Check the translation

Here is our guide on how to use ACF with WPML: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/

If the fields do not display after these steps, may be due to a server configuration (most often max_input_vars) I checked the settings of your server through debug log and saw that some items need attention:
Increase WP memory
Please increase the PHP memory limit to 256mb. Currently this memory is set to 40mb only.
https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

PHP Version
Upgrade from PHP to version 7 or higher. This is a practice recommended by the WordPress.org website: https://wordpress.org/about/requirements/

MaxInputVars
Currently your server is configured with MaxInputVars = 1000, which is too low and can cause problems. Please increase this to 10,000. There are two options to do this:
== php.ini file
Open the php.ini file and insert/edit this line:

max_input_vars = 10000

hidden link

== .htaccess file

php_value max_input_vars 10000

--- Besides, even those fields started and left as "Copy Once", those fields should be included in the translation editor since by definition, they can be subsequently changed from their original value (copied from original post).
By default the "Copy-Once" field is not displayed on the Translation Editor. Only the fields set as "Translatable" should be displayed. To edit a copy-once field, you should use the Manual Editor:
- Go to the edit screen of the page (default language)
- Change the language using the Language Switcher at the top admin bar
- If it displays a warning, click on "Edit Anyway"

Please let me know if it worked for you.

Kind Regards,
Diego

September 21, 2018 at 4:01 am #2754019

carecweb

Thanks for the detailed explanation per point asked Diego. I hope your colleagues will resolve tickets the same way: answering each question directly and not copy-pasting standard text from a manual, leaving your users to connect the dots between the text and their issues.

I understand your point now on how "copy-once" behaves. Though it is still unintuitive it was designed this way, because the nature of copy-once is that it should be translatable/changeable from the default value. Consequently, this new setting appears to be useless now, since it would be much safer for translatable fields to have the value of "Translate" since you can easily copy the original value in the translation editor when originally creating the translation. Probably should not have been added to the newer versions of WPML.

Also, I've discovered that the possible root cause of custom fields not being displayed in the translation. From my tests, that bug appears when the original post's custom field has a value of "0" ( I haven't tested for other versions of "FALSE"). I have followed your instructions while toggling the value of a field between "1" and "0". When the value is 0, the custom field does not appear in the translation editor. When "1" (or something else I've inputted), then it does.

Please relay to your developers for this possible bug. Thanks!

September 21, 2018 at 12:18 pm #2755135

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there, Thanks for the feedback 🙂

I will notify the developers of this possible bug. If you need more help just let me know.

Kind regards,
Diego

September 21, 2018 at 1:07 pm #2755254

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

To confirm the suspected bug, we need to reproduce the issue in a clean install.

I created a test website with a clean WordPress install. You can access it through this link:
hidden link - Through this link you will be automatically logged in.

Please upload the ACF plugin and the required plugins to this test install and setup it the same way as in your website (using the same options). After that please create some dummy content to reproduce the issue. Please note that we only need the plugin, some dummy content and the related functionality, you don't need to setup a entire website or clone your existing site.

I will do some testing to confirm the suspicion and then forward to the developers who will use this installation to analyze and fix the issue.

Kind Regards,
Diego

September 24, 2018 at 10:24 am #2760161

carecweb

Done.

Go to Events->"Event English". Toggle "Is Event Date Certain" Yes/No (1/0). When "Yes" that field is shown in Translation Editor. If "No" it is not displayed.

On the above scenario, the Russian translation does not have a value for this field. I created another post "Event English 2" and then added a value of "Yes" (1) to its Russian translation. Then toggle Yes/No on English post. The problem above still persists. Therefore regardless whether Russian translation has custom field value, the appearance of the custom field in the translation editor depends on value of the original post custom field.

September 24, 2018 at 5:45 pm #2761493

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thanks! I have forwarded this ticket to our compatibility team. They will check the issue. I will update this ticket as soon as I receive feedback.

PS: It's also possible to modify the value on the translation using the manual editor:
- Go to the edit screen of the page (default language)
- Change the language using the Language Switcher at the top admin bar
- If it display a warning, click on "Edit Anyway"
- Edit the value and save.

Regards,
Diego

September 26, 2018 at 8:42 pm #2768707

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

PS: Have you tried the manual editor workaround? (reply #2761493)

September 26, 2018 at 8:49 pm #2768736

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

We checked that It's possible to have the same behaviour using quotes (see screenshot):
"1" : Yes
"0" : No
as "0" evaluates to false and can also be used to do some maths if needed.

You can check on the test site: hidden link

If you really need to use it without the quotes. Do you have an pratical example of where you would need to translate these fields? Why would it be important to have different values of these fields in the original page and in the translation? - I got these questions from the developers, it is important to help us prioritize the bug fixes.

Kind regards,
Diego