Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by Prosenjit Barman 1 year, 8 months ago.

Assisted by: Prosenjit Barman.

Author Posts
November 15, 2023 at 9:49 am #14806777

andrejO

Hello,

we have problem with translating Yoast SEO metabox values across languages in term of taxonomy product_cat. Translating via swithing language in admin bar is disaled for this taxonomy and in build translations modal only title, slug and description are provided.

Can you help?

Thanks for reply

November 16, 2023 at 11:17 am #14824869

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're having and will try my best to assist you in this matter.

Since the problem you're experiencing occurs in the Product Category section, I have conducted a check and can confirm that information can be manually entered into the Yoast meta box field in other languages as well, without any issues. For a clearer understanding, please check this video: hidden link

Since everything works fine there, would you please let me know the steps to replicate the issue? If you can capture the issue in a video and share the video in the next message, that would be extremely beneficial in understanding the problem. I will check and assist you accordingly.

I appreciate your cooperation in this matter. looking forward to your response.

Best regards,
Prosenjit

November 20, 2023 at 7:26 am #14873391

andrejO

Hello, I have attached a video URL capturing the problem.

hidden link

Steps on video:
- I go to the product categories page
- I open random category detail page in the Slovak language
- Then I try to change the language to Czech, and the page reloads but the language switcher shows still Slovak, however, the displayed content in fields is Czech content.
- When I hit the save button, the error message appears: Category was not updated.

We have a different website with the same theme and plugins. The difference which I suspect is that this site has Yoast Seo Premium. Are you able to check the functionality with Yoast Seo premium, please?

November 21, 2023 at 4:21 am #14881607

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hello There,
Thank you for sharing the video and the steps to replicate the issue.

I installed the Yoast SEO PRO in my development environment to check further and can confirm that the categories in other languages can be saved without any issues. To see my findings, you can view this video I recorded during the investigation: hidden link

It looks like the issue is specific to your setup, possibly due to a unique configuration within another plugin or a conflict between plugins. Would you please run a plugin conflict test on your site? I hope it will help to identify the root cause of the issue. Here are the steps to follow-

- Take a full backup of the site and database.
- Now, deactivate all plugins on your site except for WPML and its add-ons, and WooCommerce, and check if you can update the translated categories.
- If that solves the issue, start activating the plugins one by one and after each activation, try to save the translated categories and see if the issue reappears. In this way, you'll be able to pinpoint the plugin that is causing the issue.

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

Best regards,
Prosenjit

November 21, 2023 at 8:42 am #14883175

andrejO

Hello again,

I have tested this problem on different website using the same theme configuration and plugins. And I found that the problem occurs when using different domains per language only. For both sites, we have staging environments that have subfolders per language setting and in that case, it works. Can you test the saving behavior on different domains per language setup, please?

Thanks

November 22, 2023 at 3:28 am #14892571

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hi There,
Thank you for the update.

If you're using the "Different domain per language" format, there might be a problem with the transfer of cookies or session data between languages, affecting the saving of translations. Would you please try the following steps and see if that helps to solve the issue?

1. Go to "WPML > Languages > Language URL Format" in your website's admin panel and enable the "Automatically log in and out" option under the "Different domain per language" section.
2. Then, navigate to "Settings > Permalinks" and resave the permalink structure.
3. Log out from the main site, and then log in again on the secondary language site using the same credentials. This helps to share cookies and other necessary information across different domains.
4. After logging in, visit "Products > Categories" and attempt to save a category in the secondary language.

Please let me know if that helps or if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

November 22, 2023 at 8:43 am #14893745

andrejO

Hello again,

I have completed the steps you described but it has not helped.

Is there some other method of how to find out where the problem originates, please?

November 23, 2023 at 4:08 am #14903491

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hello There,
Thank you for patiently following the instructions.

Since 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

November 23, 2023 at 5:00 pm #14910509

andrejO

Hello,

I cannot provide the FTP or admin access to the production page. I wanted to recreate the setup on the staging site. As was described earlier, on the staging site there wasn't different domains per language setup. We have switched this option using another subdomain to mimic the behavior on the production site, but have not surprisingly achieved the expected result. It was working fine even with different domains per language.

Next what we have observed is that: When we want to access the product category term edit page from the Slovak domain .sk the language switcher in the admin menu bar won't switch, the content displayed is however in the language I wanted to switch to. Then when I make some changes and hit the save button, the error message Category was not updated appears.

The only way to access this edit page and save the translation we have managed to find out is to access the secondary language shop front, navigate to the term archive page, and click edit term in the admin top bar, which redirects to the admin dashboard without changing the domain language suffix (.hu stays .hu) a then it works and gets updated.

We discovered that the problem comes from the filter 'get_terms_args_filter', which we have temporarily solved using:
remove_filter( 'get_terms_args', array( $sitepress, 'get_terms_args_filter' ), 10, 2 );

The filter gets the current language wrongly, therefore on trying to find a duplicate slug in the saving process it works with a wrongly translated slug and reaches the duplicate condition thus throwing the error.

Can you investigate this problem further please, as we want also the shop administrator to work with the system without any problems and tricky bypasses.

Thanks in advance.

November 24, 2023 at 8:04 am #14913741

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hello There,
Thank you so much for your valuable insights.

I have configured the different domains per language in my development environment and checked as per your instructions. I can confirm that the Categories in different language is getting updated without any issue. I never encountered any error during the process.

You can check this video that I recorded during the investigation: hidden link

If you're removing the "get_terms_args_filter" of the Sitepress object, that won't be a feasible solution, especially in a WPML-enabled environment.

If you believe that the filter is getting the current language information wrongly, would you please try the following and check if that helps to solve the issue?

- Please go to WPML > Support > Troubleshooting page
- Click on the buttons marked in this screenshot: hidden link (Take a backup prior to that)
- Clear the caches from the secondary language and then try to update the translation.

If the issue persists even after that, I kindly request you to share the access to the site where you're having the issue. If it is not possible to share the access, you can make a copy of the site using the "All In One Migration package", upload the package on Google Drive/One Drive, and share the link to that package in the next response.

I will deploy it in my development environment and investigate further. I already have enabled the private box for you so that you can securely share the information.

Looking forward to your response.

Best regards,
Prosenjit

The topic ‘[Closed] Translation of Yoast seo fields in product_cat terms’ is closed to new replies.