This thread is resolved. Here is a description of the problem and solution.
Problem:
After upgrading from WPML v4.5.5 to v4.7.4, French ACF pages were causing 404 errors unless an admin was logged in. The issue was observed on a staging domain, affecting only the French pages while English pages loaded correctly.
Solution:
We recommend following these steps if you're experiencing similar issues:
1) Upgrade all plugins to their latest versions, including WPML to at least v4.7.6. 2) Temporarily switch to a default theme like Genesis parent theme. 3) Resave your settings under Settings >> Permalinks. 4) Switch back to your original theme. 5) Clear all types of caches.
This approach resolved the issue in the staging site and our local environments.
If this solution does not apply to your case, or if it seems outdated, 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 for further assistance.
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:
We upgraded from WPML v4.5.5 to v4.7.4 and now our pages are causing 404s, except when we are logged in. Oddly, if there is an admin logged in, anyone can see the ACF pages (verified by loading the site from a computer on a different network). Once the admin user logs out, the ACF pages revert to 404s again. The site is French and English, using 2 separate domains. The English pages load fine, it's just the French pages. We're testing using a staging domain: hidden link. The ACF page(s) in question are English: guitars/, and French: guitares/. And possibly the Gravity Forms are not showing either...
Symptoms:
French ACF pages cause 404 errors unless an admin is logged in.
We are still working on this ticket. But a couple of doubts.
1) Have you changed the default language of the site from English to French at any point in the past? This page seems to be working as expected on our end: hidden link
2) Have you made any changes in the staging site recently? Becuase all the following pages show a 404 error.
I'm the dev that just recently took on this site. I don't know if the site main language was changed at any point. The English site is working fine, it's the French that stopped working after the upgrade.
The staging-s server is a clone of the live site, and it's using the French subdomain (the English menu link still goes back to the main site.)
And yes, the issue is the French pages are all showing 404s, except when you are logged in. I have only confirmed this from a logged in admin standpoint. Either way, there will never be regular users logged into the site.
Thank you for the updates. The French pages are showing a 404 error for both admin and non-logged-in users. Please check and confirm this. You can refer to the following screencast and the attached images for more details:
hidden link
Currently, you have selected the A different domain per language option under WPML>>Languages>>Language URL format, and set boucherguitars.com as the domain for the English language in the staging site. That is why the menu links are pointing to boucherguitars.com. For more information, please refer to the following documentation:
Yes, we know that the menu is still pointing to the live site. That's not the issue. The issue is that none of the French pages render, but instead kick out a 404. We just want the French pages to work - the English pages works
Thank you for the updates and for granting permission. I created a copy of the site using All-in-One WP Migration, as both the free and pro versions of Duplicator are not working due to a conflict with your hosting settings. Please refer to the attached images for more details.
We will get back to you as soon as possible. Please wait.
Sorry for the delayed response due to the holidays. We have followed the steps below and were able to get the expected results on both your staging site and our local environments. This suggests the issue was likely an exception.
1) Upgraded all plugins to the latest versions, including WPML 4.7.6
2) Switched to the Genesis parent theme
3) Resaved the settings under Settings >> Permalinks
4) Switch back to Guitares Boucher child theme
5) Cleared all types of caches
Please check the site now and let us know your feedback. Refer to the attached images for more details.
I've applied your suggested changes to the live site and they did not work. Now both the English and French pages are not rendering correctly - they are kicking out 404s.
The English site is now trying to use French roots in the URLs, for example:
hidden link
Instead of using /guitars
The support account is present on the live site, so you can log in and take a look.
-Nancy
New threads created by Bigul and linked to this one are listed below:
Thank you for the updates. It seems to be a redirection issue. I have created a new ticket to help track this more easily. I will follow up with you shortly on the new ticket. Please stay tuned.