Background of the issue:
We're having issues with translating job listings in the French language on our site hidden link. I've tried flushing the site cache, saving the permalinks, and a general list of options on the troubleshooting page I found when googling for 'WPML 404'. My colleague also shared another link that 404-d but I managed to fix that using the permalink trick I mentioned before. I also made a staging site if you guys want to have a look/login. This backup represents the site as it was before I tried the permalinks trick. Live is with the permalink trick.
Symptoms:
French translation of job listings throw 404 errors. The 404s might be inconsistent, with one link working one moment and 404ing the next.
Questions:
Why are the (French) translations of job listings throwing 404 errors?
How can I fix the 404 errors for the French job listings permanently?
Do you need login info/system log files to investigate further?
I'd appreciate it if you could provide the login info for the staging website so we can investigate why the French translation is not working and shows 404 on some pages.
Please make sure that the reply is set as private by checking the private checkbox.
I've restored the live site with a more recent backup to staging and if all goes well you should be able to log in again and WPML should be up and running
My apologies. I shared the wrong url. This is for the NL site apparently. The url you need is this one. Subtle difference 🙂 hidden link. Same login should apply
Thank you for the login information. The issue is that you have the same wording for the slug of a custom post type and slug of a category and that mixes things and confuses WordPress and WPML.
If you go to WordPress Dashboard > WPML > Settings > Post Types translations you will see a custom post type called "Ecademies (academy)" which has a slug academy.
Now if you go to WordPress Dashboard > WPML > Taxonomy Translation and select Cagtegory you will see that there is a category called academy and change the translation for the French to something else.
So it will not have a conflict, then go to WordPress Dashboard > Setting > Permalinks and save to flush permalinks cache.
I think you didnt get us right. We are not experiencing this problem on academy posts. We are experiencing this problem with job listings. You can check them here: hidden link. Sometimes the job listing does load. Then try to go to dutch and back to french.
So I went to WordPress Dashboard > WPML > Settings > Post Types Translation
Searched for Jobs and found this entry:
Jobs (job_listing)
Clicked the "Set different slugs in different languages for Jobs." link below it and I saw you set poste as the slug of the job. Which has a conflict with the POST default WordPress post type.
I changed it to emploi and clicked the blue save button.
After that I cleared permalinks cache by re-saving Settings > Permalinks and now it works ok.
I've done what you described on the live site.
But I can't get it to work. Can you log in on the live site hidden link please and take a look? I think I followed all your steps correctly but maybe not. I also cleared the site cache.
The login user and password are the same on here. And the login page is at the same location too.
I checked and could not find why it is happening, the URL is exactly the same and is ok and if you use it from the listing it shows 404 but from other places for example if you go to single job in Dutch and then go to French it worked with the exact same URL.
Also I found out if you are not logged in and use the private/incognito window of your browser the job listing in French works ok:
hidden link
So maybe there is a plugin or code or the theme or a server related issue which I am not sure.
Try to troubleshoot the normal way to see if you can find the culprit:
- 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.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except WPML and its add-ons.
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.
The topic ‘[Closed] French translation of job listings throw 404s’ is closed to new replies.