Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue where the 'Exclusions condition in Elements' loses the Post Tag in the Vietnamese language version of their site. They also inquired about the 'Copy Once' functionality of ACF fields and whether they can add code to the theme without losing changes after an update.
Solution:
Firstly, we identified that GeneratePress might not be retrieving the ID of the translated taxonomy or post tag, which could be causing the issue. We recommended following the solution provided in a previous support ticket, which can be found here: https://wpml.org/forums/topic/conflict-between-generatepress-premium-and-wpml-string-translation/page/2/#post-15134333. This involves manually adding the conditions on the Vietnamese version of the site.

Regarding the 'Copy Once' setting, it should copy the default value to the translation only once. If issues persist after updating the ACF field or modifying the page name, it indicates that the Translation setting for that field may not be correctly implemented. The client should ensure that the field is set to 'Copy.'

For the code solution, it should be implemented directly within the plugin file, and the client should save the code separately to reintegrate it after a plugin update. We also suggested contacting the GeneratePress support team to discuss the issue and the proposed solution, which they might include in a future update.

If the solution provided is not applicable due to being outdated or not relevant to your case, we recommend opening a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please contact us on the WPML support forum: https://wpml.org/forums/forum/english-support/.

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

Last updated by Prosenjit Barman 1 year, 1 month ago.

Assisted by: Prosenjit Barman.

Author Posts
April 23, 2024 at 7:38 pm #15557944

robinB-8

I am trying to: keep Post Tag in "Exclusions condition in Elements" not lost

Link to a page where the issue can be seen: hidden link

I expected to see: keep Post Tag in "Exclusions condition in Elements" not lost

Instead, I got: they lost in vietnamese language

Please view this video: hidden link

April 24, 2024 at 7:54 am #15559098

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thanks for contacting WPML Support.

I see the issue you're encountering with the exclude condition. Based on the WPML Debug information, it appears that the translation preference for the field where the exclude condition is applied is set to "Copy Once." This setting could be why the values aren't appearing after the second translation update.

Please try the following and check if that helps in solving the issue.

- Please go to "WPML > Settings" and scroll to the "Custom Field Translation" section
- Click on "Show system Field"
- Search for '_generate_element_exclude_conditions'
- If that appears in the result, set the translation preference for the field to copy.
- Clear the caches from your site and browser and open the default page in the WordPress editor.
- Remove the excluded data from the default page and update the page.
- Now, please re-enter the excluded data, update the page, and also update its translation. Repeat this process to check if the data is removed from the translation upon the second update.

Let me know how it goes. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

April 24, 2024 at 8:50 am #15559512

robinB-8

I did. And still the same error.

In vietnamese, when I access wordpress editor, post tag in exclude condition is blank

April 25, 2024 at 3:14 am #15563077

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for the update.

As the issue persists, a closer inspection will be required to understand the root cause of the issue.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields 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.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please backup site files and database before providing us access.
-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. The private box looks like this:
hidden link

Looking forward to your response.

Best Regards,
Prosenjit

April 26, 2024 at 3:56 am #15567672

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for sharing the access information.

I've checked and found that Generatepress isn't retrieving the ID of the translated taxonomy or post tag. It seems that the translation support might not be integrated for the conditions, which is likely causing the issue.

Upon review, I noticed that you've previously reported a similar issue with the Display condition (https://wpml.org/forums/topic/conflict-between-generatepress-premium-and-wpml-string-translation/). Please note that the solution outlined in that ticket is applicable in this case as well. You can follow the solution provided in this response: https://wpml.org/forums/topic/conflict-between-generatepress-premium-and-wpml-string-translation/page/2/#post-15134333, which should help resolve the issue.

Alternatively, you can manually add the conditions on the Vietnamese version of the site, where the translation support is more limited.

It's crucial to note that despite implementing the code solution, you might observe that the value remains unselected in the Vietnamese version. However, the translation will take effect on the frontend seamlessly.

Please check and let me know the update. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

April 26, 2024 at 11:14 am #15570324

robinB-8

1. I think "copy once" is only copy one-time. Tại sao nó cứ copy mỗi lần tôi cập nhật ACF.

When copying only one-time, I just need to add conditions one-time in vietnamese and it stays the same when I change ACF in the English version?

2. About code solution, can I add theme in code-snippet plugin?
If I add code in generatepress plugin, It will lost when they have an update.

April 26, 2024 at 12:13 pm #15570510

robinB-8

1. I think "copy once" is only copy one-time. Why does it keep copying every time I update ACF?

When copying only one-time, I just need to add conditions one-time in vietnamese and it stays the same when I change ACF in the English version?

2. About code solution, can I add theme in code-snippet plugin?
If I add code in generatepress plugin, It will lost when they have an update.

April 29, 2024 at 3:25 am #15574533

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
I hope you're doing well. Sorry for the delay in responding due to the weekend.

1) The 'Copy Once' setting typically copies the default value to the translation just once. However, the problem described here occurs not only when updating the ACF field but also when modifying the page name. Updating the translation subsequently still leads to issues. This suggests that the Translation setting for that field may not be implemented correctly. As a result, the proposed code solution should be effective. Ensure that the field is set to "Copy."

2) The code solution should be implemented directly within the plugin file because it relies on specific classes and variables that do not operate outside this context. It's wise to save the code separately so that you can easily reintegrate it if it is removed after a plugin update. Additionally, consider reaching out to the Generatepress support team to explain the issue and propose your solution. If they find it feasible, they may include it in a future update of the plugin. I hope you can understand.

Please let me know the result. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

April 29, 2024 at 10:34 am #15576428

robinB-8

thanks