Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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

Last updated by adriO 1 year, 1 month ago.

Assigned support staff: Lauren.

Author Posts
November 2, 2018 at 9:19 am #2871310

adriO

I'm trying to create a template for the yoast met description field. It consists of the post (product) title and an sentence. I managed that for the English (default) language. Trying to get the string translated was a pain in the b... because the string refuses to come up in string translation. After a while (quiting and restarting the site an string translation for a couple of times) it came up. Not very reliable I should say.

I translated the string to Dutch and saved it.
When I create a product the template shows fine in English the primary language.

When I translate a fresh product the snippet shows the product title fine, the url is fine but the meta description is wrong.

In the description field the title is showing fine in Dutch however the translated sentece following the title is still in English. What ever I try it won't show the Dutch version.

I have added a couple of screenshots to make it more clear.

• In yoast_product_description_template_setting.png you can see how the template is set in the yoast setting.
• In string_translation_for_yoast_meta_description.png you can see the string is translated correctly
• In yoast_snippet_english.png you can see how the snippet is shown in the English product dashboard screen
• In yoast_snippet_dutch.png you can see that the snippet is shown wrong.

I went back to the WordPress editor for creating translations just to show and check the snippet.
Normally I use the WooCommerce Multi Lingual editor.

BTW when translating products the yoast meta boxes are not shown on the product translate screen. In my case that is not so bad when i can trust the template is working correctly.

For me this is an urgent matter because the site has to go live shortly. I simply don't have the time to wait for months for a solution. In my experience WPML is known for their extreme slow support when an issue is a little bit unusual. So put the pedal to the metal 🙂

November 2, 2018 at 8:55 pm #2872909

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

Please go to WPML -> Settings and in the custom fields section, check the Yoast Meta Description field. Set it to translate. If it is already set to translate, please set it to something different and save the changes. Then set it back to translate and save again.

Next, edit the product in the original language and update the meta description. Now, when you view the translation editor, do you see the fields to translate the Yoast strings?

If not, please go to WPML -> String Translation. Are you seeing multiple strings available for the Yoast Meta Description here?

November 3, 2018 at 6:00 am #2873621

adriO

Hoi Lauren,
Thank you for your reply.

I search the list (WPML -> Settings) with custom fields but I did not discover any Yoast field.
Next to be more precise:
I looked in the MySql database for the correct meta key name and that is: _yoast_wpseo_metadesc

This one is not found in the Custom Field list either.

Going to ST again no description strings ar e coming up, but the one I did show you in my additinal post.

Any ideas?

November 5, 2018 at 1:55 pm #2877096

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Please go to WPML -> String Translation and at the bottom of the page, click the link "Translate Strings in Admin Texts". Then, look for the _yoasat_wpseo_metadesc there. If you locate the string, check the box and click Apply at the bottom of the page to add it to String Translation table.

If you do not locate the string there, please let me know and I will continue troubleshooting.

November 5, 2018 at 7:28 pm #2878164

adriO

Hi Laruen, thank you for your reply.

I tried to search for _yoast_wpseo_metadesc on the string translation page like you told me but nothing found. Clicked several hundreds of links to unfold them but no hit for the field name.
That could maybe make sense because the leading underscore indicates that it is an hidden field.

What I found was: metadesc-product with my string "%%title%% Yet another...." see screenshot. That one was checked. You can see "metadesc-product" is named in the context field of the string translation screen.

Doing some more digging I found that it is in the admin_texts_wpseo_titles text domain. I deleted the string, searched for it again, translated it but sadly no avail.
I did see however that it is in the database saying: %%title%% Alweer een foto.....

The %%title%% placeholder however is translated correctly like said in my original post.

Short, we are back at square one.

I added some screenshots, one from the string translation screen displaying the string and another one from the database showing the translated string. It is just not displayed in the edit product screen for the Dutch translation.

It is double painful because I'm not able to test it on the frontend because those strings are only visible on the Google Search result pages (or whatever search engine). So I have to rely on what I see in the edit product screen.

I do hope you can get it sorted out shortly. I'm a bit in a hurry.

All the best,

Adri

November 5, 2018 at 9:54 pm #2878575

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Thanks for checking the admin texts. I found this similar ticket: https://wpml.org/forums/topic/i-can-not-find-yoast-seo-title-meta-description-from-custom-filed/

Please make sure that you have updated the meta description on the original product (so that it is not using the default). Then, the fields should show in the translation editor. If it still does not, please copy and paste the content from here hidden link to WPML -> Settings -> Custom XML Configuration. Then, update the original again and now the fields should show in the translation editor.

Please let me know if you need any further assistance and I will be happy to help.

November 6, 2018 at 6:37 am #2879609

adriO

Hi Lauren,
Thanks for the reply.

Indeed, when I change the Yoast meta description in the original English product the field is shown in the WooCommerce Multilingual translation editor. It is the English changed string and no Dutch translation. So, that's a step in the right direction towards a solution.

However.... the point of creating a template (%%title%% Yet antother image....) is that this does not have to be entered for every product. And, when translating the product, the translated string has to pulled in from the database.

What I can see is the English template (form the Yoast settings) is pulled in correctly but not the translated string when creating a Dutch translation. And that is what I need.

In that respect we did not made any progress at all.
In short.... I still need assistance.

Have a nice day!

Adri

November 6, 2018 at 10:54 pm #2882904

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Thanks for your assistance with further testing. I decided to set up a test site on a clean install so that I could try a few different things. I have granted you access to the same test site here:

Login: hidden link
Username: demo
Password: SKa5a4rQ25Bb

Here, you can see that I created a product in English and Translated it to Spanish. I used the same settings from your screenshot in the Yoast SEO product settings. I then translated the string via String Translation table.

What I found is that when I use the metadata checker here hidden link, the meta description translation is showing correctly, regardless of how it looks in the preview snippet. Please see attached screenshot.

Could you please test your URLs using the metadata checker and let me know if you see the translation showing there?

November 7, 2018 at 6:14 am #2883774

adriO

H Lauren,
That's a good result!

Strange that the snippet editor shows the wrong result but in your test the right one......

I tried to test it on my en but that fails. That is because the site is on my local machine at this moment. I will try to test it in an online environment but I need some time to set it up.
I let you know when I'm done as soon as possible.

November 7, 2018 at 8:10 am #2883993

adriO

Hi Lauren,
I took the time first to test it out.
It seems that the correct description is shown as you were already stating in your last reply. That's a great discovery.
Following that I thought: "Oh, but then is it possible to see it in the page source as well". So I checked it and indeed, also on my local install it is shown fine. You can see it in the screenshots, the first and second ones are from my (hidden) online spot, the screen shot of the page source entry is from my local install. As you can see the meta description is all in Dutch.

For now it seems to me that I can trust what I see and go on with the project.

But still it is a flaw that needs to be fixed. I think it is a good idea to push this forward to the dev department so that they can (in coop with yoast) iron this out.

November 7, 2018 at 3:22 pm #2885980

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

I have escalated this to our compatibility team so that they can try to resolve the issue of the snippet showing in the default language. I'll let you know as soon as I hear something back.

November 7, 2018 at 3:26 pm #2885987

adriO

Hi Lauren,
That's great, let's see if they come back with anything. In my experience it always take a very long time. If they are responding to it at all.

But, let's stay optimistic.

Thanks for your help and have a nice day!

November 7, 2018 at 4:07 pm #2886125

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

I can assure you that they will respond to it. Issues with higher priority (i.e. more users affected or reported the issue) will take precedence, but they would not ignore the reported issue all together.

I'll keep you posted here, and you have a nice day as well 🙂

November 8, 2018 at 7:12 pm #2890638

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Our developers took a look and found that if you go to Users -> Your Profile and enable "Set admin language as editing language.", then go to WPML -> Languages and scroll down to the Language Filtering for Ajax section andheck the box to enable "Store a language cookie to support language filtering for AJAX", the translated snippet will display on the translated product page.

Please test this on your live site and let me know if this works for you. You can see it on the test site that we created by logging in with username WPML and password OTGS

November 10, 2018 at 7:42 am #2895272

adriO

Hi Lauren,
That's great! It works as you predicted. So the issue is solved.
Thanks for helping me out.

Best wishes,

Adri