This thread is resolved. Here is a description of the problem and solution.
Problem:
The client was testing the pay-as-you-go automatic translations option and encountered two issues: (1) an unexpectedly high number of translation credits were used, and (2) the content of the translated page was not visible when trying to review it.
Solution:
For the first issue, it was clarified that metadata attached to the page was also translated, which increased the word count and thus the credits used. To prevent this, the client can add the following line to their wp-config.php file:
define( 'ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS', true );
For the second issue, the fields on the page needed to be set to 'Translate' to appear in the translation editor. The client was advised to update the ACF field settings according to the guides on translating sites built with ACF, available here:
Setting Field Group Translation Option
Expert Translation Option
If these solutions do not resolve your issues or seem outdated, we recommend opening a new support ticket. Additionally, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. For further assistance, feel free to contact us directly at the WPML support forum.
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.
Tagged: Exception
This topic contains 17 replies, has 3 voices.
Last updated by rikkeL 1 year, 1 month ago.
Assisted by: Prosenjit Barman.
Author | Posts |
---|---|
May 8, 2024 at 9:31 am #15605181 | |
rikkeL |
I am trying to: Link to a page where the issue can be seen: I expected to see: Additionally, it is now showing that there is "1 translation waiting for review", but when I click this, it shows an empty table. If I try to review it from the "Pages" section, it just shows me an empty page with menu and footer. So, in conclusion we've got two problems; (1) too many credits were used on the automatic translation, and (2) the content of the translated page is not shown when trying to review it. I hope to hear from you soon! |
May 8, 2024 at 6:05 pm #15607506 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, According to our system the page "hidden link" was completely translated and delivered. The word count of the page was 626 and 1252 credits were used. You can see the job here if you are logged in to your website: Furthermore, you will be charged for the 2000 credits at the end of the billing period. With Pay-As-You-Go, you use credits in the current month and pay in the following month. If you use fewer than 2000 credits, no amount will be charged. Best regards |
May 8, 2024 at 7:06 pm #15607635 | |
rikkeL |
Hi Andreas, this really cannot be. The estimated wordcount from your own plugin is 69 words (see screenshot). So I'd like to understand how you can get it to 626 words because this will completely change the way we then calculate the costs of using your product and also indicate that we can't trust your word estimation in the tool. Regarding the page in question - I can't get to review it. If I click on the "1 translation waiting for review" on the dashboard (see screenshot) then it leads me to the "translations" page with an empty table (see screenshot). If I go to the "pages" section of WP and click the little eye showing that the German page is pending review (see screenshot) and click it, then I see an empty page (see screenshot). I hope you can elaborate a bit on the whole word count issue and propose a solution for the "missing" German page. |
May 8, 2024 at 11:37 pm #15607984 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Yes, it is true that the content had only 69 words, but there was metadata attached to this page. This is expected and caused a difference of 1114 credits which I have now credited to your account. You do have now 1862 available credits but please take note that this is an exception, as we are actually paying for those credits and it is the default behavior that any metadata will get translated together with the posts or pages. I suggest you read the following article about this topic: In your case, the job shows that many field labels, instructions, descriptions, and choices have been translated together with this page. I suppose they are coming from ACF. See screenshot. If you want to exclude those ACF strings from translation, you need to add the following line to your wp-config.php file: define( 'ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS', true ); |
May 9, 2024 at 6:53 am #15608761 | |
rikkeL |
Hi Andreas, thank you for the fast reply! Okay, we weren't aware that meta data also got counted in this translation - thank you for clarifying. For the second issue, what do you suggest? I still can't get to see and review the page I tried to translate? |
May 9, 2024 at 7:02 am #15608801 | |
rikkeL |
And furthermore, so we're on the same page. What do you define as meta data? I can only see that we have a title of 9 words and a description of 15 words, so what are the rest of the credits used for? Thanks! |
May 9, 2024 at 8:16 am #15609338 | |
rikkeL |
Hi again, please just overlook me last message - so from what I gather you mean that the meta data also is all the Advanced Custom Fields text that is being translated. We'll try your solution for this. However, we've now managed to get to the point of reviewing and completing the German page (see screenshot). Going to preview the page from the "pages" section in the WP sidebar, the preview is just empty for the German page. I can only upload images here, but is there any way I can send you a screen recording - that might be easier? Thanks! |
May 10, 2024 at 9:40 am #15613774 | |
Prosenjit Barman WPML Supporter since 03/2023
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, I took over this ticket and will be happy to assist you in this matter. I understand the issue you described in your previous message. If the content on that page is being added through ACF fields, you need to ensure that these fields are configured as Translatable. If not, the content won't appear in the secondary language. Upon reviewing our translation management, it appears that only the text highlighted in your screenshot has been translated. I haven't noticed any other content from that page in the editor. The translations present in the editor are for the ACF field labels and placeholders. So, it looks like the fields may not have been set up correctly for translation. Please follow these steps to configure the fields properly and attempt the translation again: 1. locate the field group containing the ACF fields where you have added content. Change the translation option for this field group to "Expert" by following the instructions in this guide:https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#setting-field-group-translation-option After updating the translation settings for the fields, open the default page in the editor and make a small change in the title. After that, update the page and proceed to update its translation. The contents should now appear in the Editor for translation. Please let me know if the information above helps or if you need further assistance in this matter. I will be happy to help. Best regards, |
May 10, 2024 at 10:56 am #15614226 | |
rikkeL |
Just to make absolutely sure, because we are now switching from manual (or at least we hope to do that), we need to change all the fields from "Copy Once" to "Translate"? We have a lot of fields on this site (282 pages on the settings page), so we need to know that this is correct, before we start changing the settings. Also as suggested earlier in this ticket we've also added: define( 'ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS', true ); Unfortunately, we did not create a screen dump when testing the translation. But as in this image hidden link all content was translated and we accepted every single translation. Therefore we are a bit confused about the setup - why are the translations shown, but not used? At least why do we not get any warnings, if the settings are incorrect? Best, |
May 13, 2024 at 3:43 am #15618315 | |
Prosenjit Barman WPML Supporter since 03/2023
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello Rikke, The "Copy-Once" setting for the field will only copy the field value to the translation once; after this, any modifications must be done manually. For a detailed explanation of how the 'Copy-Once' settings function, please refer to this link. You now have two options: manually update the translation or change the field settings to "Translate" and then retranslate the page. This should allow the field data to appear in the translation editor. The constant you added will prevent the field label and placeholder from being automatically translated, conserving translation credits. To verify its effectiveness, you will need to translate a new page or post that contains ACF fields. Additionally, while it's true that you've accepted all translations as per our translation management system, only the field labels and placeholders and the text that you have marked in the screenshot were initially visible in the translation editor. If you access the Translation Editor now, you will also not see other page contents, except for "Analyze user behavior to quickly identify and resolve reasons for drop-offs" and the field group labels. There are no configuration errors, which is why you haven't encountered any issues. However, before proceeding with the translation, you should check the documentation and ensure the correct settings are applied for the content to be properly translated. If you need further clarification on what each setting does, please refer to this guide: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/ I hope I'm able to clarify things for you. But, feel free to let me know if you need further assistance or clarification. I will be happy to help. Best regards, |
May 13, 2024 at 8:23 am #15619024 | |
rikkeL |
I am very sorry, but your response is very difficult to understand, and we are still not sure how to even test automatic translation without it costing us a fortune. !. We were told to use the Copy Once by someone in your end - are you telling us, that this does not work with Automatic translation? 2. We wanted Copy Once in order to start out with the same fields and copying the data first, but later to have the ability to change both the original and the translation (e.g removing content or adding new only on one of them). Will this no longer work? 3. Do we need to change ALL the field settings to translate in order to utilize automatic translation? 4. What do we do, if sometimes we want to translate manually? Best, |
May 14, 2024 at 5:39 am #15623250 | |
Prosenjit Barman WPML Supporter since 03/2023
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hi Rikke, I apologize for any confusion. I'll clarify the steps and options for managing automatic and manual translations using ACF and WPML: 1. Using "Copy Once" with Automatic Translation: 2. Using "Copy Once" for Flexibility: Yes, your understanding of "Copy Once" is correct. Using this setting, you initially duplicate the content of fields from the original to the translation. You can also independently update the field contents in default and translation. But, if you set the field setting to Translate, you'll also have the same flexibility. But, the difference is, with the 'Translate' setting, you can update the translation in both the WordPress editor and Translation editor but with 'Copy-once' you can only update the translation manually, using WordPress Editor. 3. Changing Field Settings for Automatic Translation: For more details about the translation settings of the fields, please check this guide: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/ 4. Manual Translation Preferences: If you want to translate manually, please go to "WPML > Settings" and change the translation mode to "Translate what you choose" from "Translate Everything Automatically". After that, you can update the translation manually. For testing automatic translations without incurring significant costs, you might consider setting up a staging environment where you can experiment with different configurations and see what best fits your workflow before applying it to your live site. Please feel free to let me know if you need further clarification or assistance in this matter. I will be more than happy to help. Best regards, |
May 14, 2024 at 6:17 am #15623304 | |
rikkeL |
Hi again, But nr 1. was what we did and what we really need, and it didn't work. So we are not sure how to proceed. When you write a staging site - do you mean then that if we add an development key to out development (staging site), we will not be charged when testing automatic translation? Best, |
May 15, 2024 at 3:17 am #15627471 | |
Prosenjit Barman WPML Supporter since 03/2023
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello Rikke, Are you saying that the data from the field set to "Copy Once" hasn't been copied to the translated page/post? Based on the screenshot you shared of the German page, I noticed that the English content is displayed there, which suggests that the content appears to have been copied from the default language to the translation. Here's how you can proceed: 1. Copy Once: If you want to copy the default content to the translation and then update it manually, keep the field set to "Copy Once". When you start translating the page or post, the field data will be copied to the translated page/post. You can then open the translated page/post in the WordPress editor and manually update the translation. 2. Translate: If you want to automatically translate all content instead of doing it manually from the WordPress Editor, set the field settings to "Translate". When translating the post/page, the field data will appear in the translation editor, allowing you to add the translation directly from there. Please let me know if this process is clear or if you're still having issues. Feel free to share your objectives, and I will do my best to guide you accordingly. Regarding the use of automatic translation on the staging site: The main purpose of suggesting testing on a staging site is to ensure everything works smoothly before enabling it on your main site. However, I noticed that you're already using a Staging site. Please note that even if you use a development site key, you will still be charged for automatic translation. Let me know the update and I'll be happy to help. Best regards, |
May 15, 2024 at 6:37 am #15627763 | |
rikkeL |
I'm sorry, I don't think we understand each other, and I am not sure how to ask the question in the right way, in order for us to get an answer that we can use. "Are you saying that the data from the field set to "Copy Once" hasn't been copied to the translated page/post?" No we are saying that the translations were not saved when using the automatic translation - it reverted to the English content for all fields but one. We saw the German translations in every field, then approved all of them and saved the content, but when viewing the page, everything was English except for one field (as shown in the screenshot). Copy Once has been working for us (almost) all the time when doing translations manually - except that we have to use either "Copy content from English" or "Overwrite with content from English" when starting a new translation (we use WordPress Editor, not the WPML translation editor, because there's always data missing when this is used). Now all we want to know is whether we can use automatic translation with Copy Once? Best, |