This thread is resolved. Here is a description of the problem and solution.
Problem:
The client was experiencing issues with ACF fields not being translated in their products, displayed in white boxes within an Elementor Loop Grid. In the English version, these fields appeared as empty spaces. Additionally, the links within these fields did not translate correctly and targeted the original language URLs instead of the translated ones.
Solution:
We advised the client to set the 'acf_field_group' CPT to 'Not translated' in WPML > Settings > Post Types Translation, as having it set to 'translated' is not recommended. This change required re-translating the products where the ACF fields were missing.
For the links in the Elementor template, we identified a bug where the 'URL' field set to 'copy' by default was not being automatically converted.
As a temporary workaround, we suggested switching the field group to the 'Expert' mode and setting the 'URL' field translation preference to 'Translate'.
After updating the original post, the 'URL' field will appear in the translation job, allowing to manually convert the URL.
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.
Right. so. In Products there are ACF fields, that are not translated. The white squares in the image - sometimes it shows one, sometimes the other. But now, even in translated products, those fields are not translated - one should have theAlc.% and Volume, the other one whatever custom text.
I suspect that adjusting the settings of the ACF fields will fix the issue. Nonetheless, since you have many products, it's best that we fix the issue with auto translation first, so we can bulk update the translations. I'll keep this ticket open and will get back to it once I hear from the devs on the other issue.
There are come ACF fields assigned to each product and they show up in white boxes within Loop Grid.
In te english version they do not show up. It's just epty space where Alcocol percentage and volume should show up and, if the product is not a drink, there show up not the fields' content, but the placeholder.
Also the "Cenas no" [which is within the Item loop grid], does not translate as well and I cannot it in string translation.
- Let me know, will refresh the page every half an hour starting from tomorrows morning 🙂
Oh, and in the settings they are made translatable, as far as I understand.. [image]
Also the links do not translate into /en/ version and just target the latvian ones. I am adding this, because links are also written into ACF field of Custom Post type.
Now you may have to re-translate the products where the ACF fields are missing.
Concerning the links in the "baneri" template, the problem is the `url` field that is set to `copy` by default in the mode "Same fields across languages", so it does not show up in the translation job, and it's not automatically converted. I will escalate that as a bug.
Meanwhile you have 2 options:
1. (recommended) In "Baneri" ACF field group, convert the "URL" field into a "Link" field which is properly supported. The link URL will automatically be converted. But you'll need to re-edit all the posts using this field group.
2. In "Baneri" ACF field group, switch to the "Expert" mode and set the "URL" field translation preference to "Translate", and the field will appear in the translation job.
1. Yes, it worked. I translated everything with "Overwrite" option and the fields show up nicely. EXCEPT that "Cenas no" part. The issue is, though, that it's defined with snippet:
function show_lowest_price_only($price, $product) {
$min_price = $product->get_variation_price('min', true);
$price = wc_price($min_price);
$price = '<span class="price-prefix">Cenas no </span>' . $price; //tur pa vidu ierakstīt whatever kas sākumā iet
return $price;
}
What would be the best way around it?
2. Changed Banner field to "Link URL" [there is an option of Link Array" as well. Re-translated. Now the links do not show up in translated version - just images without links.
With "Link Array" option links appear, but still link to original, not translated URL.