Skip Navigation

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

Problem:
After updating to the latest WordPress version, translated product pages are showing a 404 error when accessed via permalinks. The issue arises when translating or modifying translations through the WPML link, resulting in incorrect permalinks for products in alternative languages.
Solution:
If you're experiencing this issue, we recommend following these steps:
1. Create a backup of your website, or ideally, test this on a staging version of your site to avoid disruptions.
2. Navigate to the WordPress Dashboard > Products.
3. Change the language to the secondary one using the top admin bar.
4. Select all the products, then from the top options, select EDIT and click Apply.
5. In the list that appears, change only the STATUS option to PUBLISHED.
6. Click the Update button.

This solution might be irrelevant if it's outdated or not applicable to your case. We 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 the problem persists, please open a new support ticket at 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.

This topic contains 3 replies, has 2 voices.

Last updated by Christopher Amirian 6 months, 4 weeks ago.

Assisted by: Christopher Amirian.

Author Posts
July 26, 2024 at 3:50 pm #16009093

dupratS

Background of the issue:
We recently updated to the latest WordPress version. Our translations went down, but we managed to get them back up. However, many product pages aren't working. When we translate or modify a translation, it shows up correctly but doesn't have a correct permalink. We follow the WPML suggestion to simply translate via the WPML link, so NOT by opening the product page in the alternative language. However, if we do that, the product in the alt language has a numbered permalink and is not structured as all product permalinks on the site. resulting in links not working. The only way to solve it (our hack) is to then go to the WP product page of the alt language and publish it without touching a thing on that page. which is scary since WPML warns to not work on that page. this then generates the correct permalink in the alt language.

Symptoms:
Translated product pages show a 404 error when accessed via permalinks.

Questions:
Am I doing something incorrectly?
Why do I need to open and publish the product in the alternative language to generate the correct permalink?

July 27, 2024 at 1:22 pm #16010772

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Most probably something caused the translated products to go in draft mode but I am not sure as I do not know what happened during the update process.

Please follow the steps below:

- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Go to WordPress Dashboard > Products.
- From the top admin bar change the language to the secondary one.
- Select all the products and from the top options, select EDIT and click Apply.
- In the list that shows do not touch anything, except changing the STATUS option to PUBLISHED.
- Click the Update button.

Thanks.

Screenshot 2024-07-27 at 17.22.22.png
July 27, 2024 at 1:39 pm #16010810

dupratS

Hello Christopher, thank you for your reply.

That's in fact what I ended up doing. as there were many products that had jumped to draft status. So it was good to understand that it was the right move to fix that. But it's unnerving to not know why it happened.

I guess more importantly it would be good to know that this is NOT the normal process when updating or creating translations in WPML. Moving forward, from here on, we should be able to update the translation or make new ones and simply hit the "complete" button at the end of the translation process on the WPML page and then WP page will be published , correct?

thank you again

July 27, 2024 at 3:10 pm #16010912

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Yes exactly, that is not the normal situation and the workaround that you already used was to mitigate the issue.

But from now on the normal process you mentioned should do the trick.

Thanks.