[Resolved] The Events Calendar archive urls are all over the place
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing issues with inconsistent URL formats in different languages when using The Events Calendar with WPML. The URLs displayed a mix of uppercase, lowercase, English, Czech, and German, resulting in duplicate pages and some links not functioning correctly, such as the 'Month' view link. Solution: We resolved the issue by making adjustments to the URL strings due to the specific way The Events Calendar is built. We recommend checking if the URLs now behave as expected.
Please note that this solution might be outdated or not applicable to your specific case. If the issue persists, 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 needed, 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:
I am trying to set up The Events Calendar with WPML to use a consistent URL format for different languages. I want the URLs to be structured as /events/, /en/events/, and /cs/events. The issue can be seen on this page: hidden link.
Symptoms:
The URLs are inconsistent, with a mix of uppercase, lowercase, English, Czech, and German, resulting in duplicate pages. Sometimes the 'Month' link doesn't work at all for some languages. For example, hidden link doesn't allow switching to the month view, and hidden link has unexpected translations and capitalization. The URL hidden link works but switches to a German URL when changing views. Some URLs are only reachable via direct input.
You can create a lot of weird urls by visiting the month or list view and then changing the language: hidden link (german "Liste") hidden link (czech "Liste") hidden link (why is this uppercase?)
Questions:
Why are the URLs inconsistent with unexpected translations and capitalization?
Why are some links not working or only reachable via direct URL input?
Where are the translations for 'list', 'month', and 'events' coming from if they're not in string translation?
I'm still checking your issue. I tried a different couple solutions that didn't work, and now I'm gathering information to take your issue to our devs. They will take a more in-depth look to what's going on.
To confirm if the issue is specific to your website, I've set up a testing environment with the same languages. Please install and activate The Events Calendar plugin and try to recreate the issue there. You can access it by clicking on this link: hidden link
Please note that only the minimum is necessary here, so there's no need to install other plugins or create content that is not related to the issue. I know this takes some effort, so I really appreciate and thank your cooperation.
Thank you for sharing the details and for the cooperation. I'm still verifying and will get a second opinion with our devs. I'll be back once I have new information.
Thank you for waiting. We've been able to fix the issue in your website. Due to the way The Events Calendar is built, we had to tweak a little the URL strings. Let me know if it's working as expected now.
Thanks, I applied the functions.php snippet to my live site and imported the slug strings via .po export/import from the dev page you were debugging on.
Now the live site is also working properly.
Will this fix be integrated into a main release or is this a permanent solution?