[Resolved] 404 Error on translated shop category pages
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing 404 errors on translated shop category pages in Spanish for specific categories like 'Categoria' and 'Tus Necesidades'. Additionally, there was an issue with updating WPML plugins as the update option was not visible.
Solution: 1. Resolve 404 Errors: - Go to WPML → Taxonomy Translation and select Product Categories. Ensure all translation fields are filled for each category, including singular name, plural name, and slug. - Ensure each translated category has at least one product assigned. - Resave permalinks by navigating to Settings → Permalinks and clicking Save Changes. - Clear all caches, including any caching plugins and browser cache. - Optionally, set WPML to display default language products when translations are missing by adjusting settings in WPML → Settings → Post Types Translation and Taxonomies Translation.
2. Update WPML Plugins: - Back up the website and database. - Download the OTGS Installer from the WPML.org account and delete current WPML plugins. - Upload and activate the OTGS Installer, then reinstall WPML plugins via the Commercial tab in Plugins → Add New Plugin. - Reactivate WPML plugins.
If these steps do not resolve your issues or if the solution seems outdated, we 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 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.
Background of the issue:
I am trying to access translated shop pages in Spanish, but I encounter issues with 2 of the 3 parent category items: Categoria and Tus Necesidades. The issue can be seen on this page: hidden link. I expected to see the translated version of hidden link.
Symptoms:
404 Error is shown on 2 of the 3 parent category items when accessing translated shop pages.
Questions:
Why am I getting a 404 error on translated shop category pages?
How can I fix the 404 error on the translated pages?
Thanks for your reply. I regret any inconvenience caused, but to proceed with troubleshooting, I kindly ask for a snapshot of the site. Alternatively, with your permission, I can create one myself. For this purpose, I typically recommend using the free plugin "Duplicator." If you're already familiar with Duplicator (https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.
To guide you further, please adhere to these instructions:
1. View the Duplicator instructions video: hidden link
3. If the archive file exceeds 400MB, please use Duplicator's file filters to exclude cache, wp-uploads directory, media, and archive files.
Once you have the archive file ready, kindly share the link with us. You can utilize platforms like Google Drive, Dropbox, or similar for file sharing, as the snapshot file might be large.
Please note that your next reply will be private, visible only to you and me. You can paste the file link there. Rest assured that once the issue is resolved, I will delete the local site.
the issue got resolved on the live site now. What I did:
1. On /wp-admin/admin.php?page=wpml-wcml&tab=slugs I just opened the translation for the slugs and saved it again.
2. then went to WP permalinks settings and also saved them again, and now for whatever-reason it is working again: erayba.com/es/categoria-producto/tus-necesidades/mantenimiento-del-color/
Did you find out something else? What could be the issue?
What it fixed was that now, in the spanish translation in the slug "product-category" got translated to "categoria-producto" which seems to have been the problem...
BUT what happens still is that the language switcher does not work, when you are on the english part of the site, for example here: hidden link then you use the switcher in the menu to switch to spanish (ES) than it takes you here: hidden link which then gets the 404 error because in the slug, "product-category" did not get translated to "categoria-producto"