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

Last updated by Ahmed Ibrahim 3 years, 3 months ago.

Assigned support staff: Ahmed Ibrahim.

Author Posts
September 22, 2015 at 6:00 pm #709913

José Luis

I am trying to: Update a custom field (wpcf-url) value in a custom post type created with toolset, so that it shows using a parametric search made with views

I expected to see: the current value in that custom field shown in the frontend.

Instead, I got: The old value was always shown. After searching in the database I discovered the new value was being "translated" for the old one thanks to WPML string translations. e.g.:

plugin Types field url value 5004 hidden link

I don't understand why it's doing that automatically, because I have not set that CPT to be translatable.

So I had to delete those strings, and now the real value is showing, but I notice the wpml strings have been automatically recreated with the new value. I suppose that each time I want to update the value I'll have to delete the wpml strings manually in order to show the correct data in the frontend... Maybe this is a bug.

thank you for your help

September 23, 2015 at 5:30 pm #710820

Tia

Hello. Thank you for contacting support. I would like to test this in a cloned environment.

I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply.

The information you will enter is private which means only you and I can see and have access to it.

** IMPORTANT ** If you do not see the wp-admin/FTP fields this means your post & website login details will be made public. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box.

I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.ther debug the problem I’d like to replicate your site locally. For this I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. If you prefer to do it on your own, you can provide me with the snapshot following these directions:
If you already know how Duplicator works (http://wordpress.org/plugins/duplicator/), please skip the following steps and just send me the installer file and the zipped package you downloaded.

:: Duplicator instructions
. From WordPress plugin page, look for “Duplicator” and install it
. Once installed, you get a new main menu “Duplicator”
. Chose “Packages”
. Click on the first button you find in the toolbar on the right (“Create Package”)
. Give it a name or leave it as is
. Click on “Create Package Set”
. Wait until the package is ready
. Click on “Installer”, then on “Package”: the first one is just a php script, the second one is a zip file containing everything you need
. Send me both files (you probably want to use DropBox, Google Drive, or similar services, as the snapshot file will be quite big)
IMPORTANT: remember to create or keep an admin account for me before creating the snapshot, or I won’t be able to login. You may delete the new admin account once the snapshot has been built.

Once the problem is resolved I will delete the local site.

To further debug the problem I’d like to replicate your site locally. For this I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. If you prefer to do it on your own, you can provide me with the snapshot following these directions:
If you already know how Duplicator works (http://wordpress.org/plugins/duplicator/), please skip the following steps and just send me the installer file and the zipped package you downloaded.

:: Duplicator instructions
. From WordPress plugin page, look for “Duplicator” and install it
. Once installed, you get a new main menu “Duplicator”
. Chose “Packages”
. Click on the first button you find in the toolbar on the right (“Create Package”)
. Give it a name or leave it as is
. Click on “Create Package Set”
. Wait until the package is ready
. Click on “Installer”, then on “Package”: the first one is just a php script, the second one is a zip file containing everything you need
. Send me both files (you probably want to use DropBox, Google Drive, or similar services, as the snapshot file will be quite big)
IMPORTANT: remember to create or keep an admin account for me before creating the snapshot, or I won’t be able to login. You may delete the new admin account once the snapshot has been built.

Once the problem is resolved I will delete the local site.

September 24, 2015 at 6:00 pm #711761

Tia

To make sure I understand correctly:

- The issue is not appearing on the duplicated site.
- The custom field (wpcf-url) created with toolset is being automatically overridden by a translation in WPML String Translation.
- The new value for wpcf-url shows up as a "translation" for the old string
- You delete the strings in WPML String Translation but the values are overridden again when you save the field in wpcf-url

Correct?

September 24, 2015 at 9:59 pm #711901

José Luis

- The issue is not appearing on the duplicated site. [CORRECT]

- The custom field (wpcf-url) created with toolset is being automatically overridden by a translation in WPML String Translation. [CORRECT]

- The new value for wpcf-url shows up as a "translation" for the old string. [NOT EXACTLY]:(The new value for wpcf-url is not shown because it's overriden by the old value from the translation in WPML string translation).

- You delete the strings in WPML String Translation but the values are overridden again when you save the field in wpcf-url. [CORRECT]

September 24, 2015 at 10:03 pm #711902

Tia

Thank you, José. I am looking into the issue and will respond shortly after investigating.

September 25, 2015 at 2:15 pm #712425

Tia

Thank you for your patience, José.

Can you try deleting the custom field, saving and then readding the custom field?

September 25, 2015 at 5:40 pm #712607

José Luis

Hey Tia, thanks to you for your help,

That suggestion didn't work. I've even deleted the meta from the wpcf-custom-fields-control page, created a new field, and the behaviour is the same. (So I restored the database bkp afterwards.)

And it doesn't just happen with the url field, it also happens with a file selector field, and a date field.

In fact every custom field in the Types plugin is being "translated" by copying the first value to the field value in wpml strings. And that is taking precedence over the real value.

The GOOD NEWS is that now the cloned site (theone you have the data for) now has the same issue. I had to deactivate and reactivate the WPML option to use string translation to translate plugins and themes. Now it's the same in both sites. I hope that makes it easier for you to find the cause.

cheers

September 25, 2015 at 7:16 pm #712655

Tia

Great! That's much more helpful to be able to duplicate the issue.

Just double checking: the credentials you gave me is for a cloned site, correct? I may need to change values, etc to debug and test and wanted confirmation it was okay to do so.

September 25, 2015 at 7:23 pm #712658

José Luis

Good, yes the access I sent you is a duplicated site, don't worry.

September 28, 2015 at 2:56 pm #713663

Tia

Great, thank you. I am currently looking into this further so we can get this issue resolved.

September 28, 2015 at 8:01 pm #713896

Tia

José,

I cannot seem to duplicate your issue. However, WPML Translation Management will give you more control over the field which you can get from here: https://wpml.org/downloads/

After installing go to:

1. WPML > Translation management > Multilingual Content Setup

2. There is a section called 'Custom fields translation' where you can set wpcf-url to "Don't Translate".

This should resolve your issue and prevent it from showing up in String Management. If it doesn't, please let me know.

September 28, 2015 at 10:45 pm #713982

José Luis

Hey Tia, you can skip to the final paragraph to read the good news.

I checked and I still can duplicate the issue everytime in both sites in every language. These are the steps I follow:

1) Edit post "WPML TEST" (for example, but anyone will work)
2) Change the wpcf-url field value, from the "Dirección web (URL)" field in the "Opciones de publicación" metabox.
3) Go to frontend page (URL= /wpml-002/en/who-we-are/media/ ) and check that the link for that publication is not the one you just entered. (the first one, in the example)
4) Check in wpml string translation that the translations for the Types plugin fields are there, and those are the values shown in the frontend, despite of the actual field value (URL= /wpml-002/wp-admin/admin.php?page=wpml-string-translation%2Fmenu%2Fstring-translation.php&context=plugin+Types )

I also followed your instructions related with the translation management plugin. I set up those fields in order to not being translated, and the behaviour was exactly the same as before. I manually deleted all the string translations, updated a post with a new value for the field, and the value was still not right in the frontend. When I came back to check the string translations I found out that all the translations for the custom fields are being recreated automatically, despite of those settings...

Finally, I found that I had to deactivate the option "Auto register strings for translation". Because when it's activated wpml automatically recreates all the translations for the fields, despite what's on the options (this for me would be a bug, could you please confirm this point with the developers?), causing the problems I was having.

thank you

September 29, 2015 at 2:14 pm #714544

Tia

Thank you, José. I have escalated your ticket to 2nd Tier support where they can take a deeper look into the matter and confirm if this is a bug or just a settings issue. Please give them time to respond.

September 29, 2015 at 8:22 pm #714865

José Luis

Thank you, Tia.

October 5, 2015 at 2:56 pm #718066

Ahmed Ibrahim
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi, this is Ahmed Ibrahim from second tier support.

I was trying to reproduce the issue at your site but unfortunately I couldn't, and here is my steps:

1- Make sure that auto register strings are enable, and "Translate the theme and plugins using WPML's String Translation" is selected from WPML -> Theme & Plugin Localization.
2- Go to "WPML TEST" and change the url.
3- Go to the front end and found that the url is correct.
(see the attached screenshots)

Please let me know if there is something wrong at my steps. So I must replicate it before reporting it to developers.

Beat Regards.