Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Madrid (GMT+01:00)

This topic contains 8 replies, has 2 voices.

Last updated by Marcel 1 month, 4 weeks ago.

Assisted by: Marcel.

Author Posts
October 17, 2024 at 2:26 pm #16300933

Mary

<b>Background of the issue: </b>
I am using a calendar plugin FullEvents - Ovatheme Events (hidden link) with WPML. I've set the slugs to be /evenement/ in French and /event/ for English. But the slugs change automatically, causing 404 errors. In the past, I was instructed to follow the instructions here to fix the problem: https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/. See past ticket here: https://wpml.org/forums/topic/url-slugs-for-each-language-change-automatically-causing-404-errors/. The flush rewrite code to instruct WPML not to add the language folder did work for a time and is still in my functions.php file. But it has stopped working and the error has returned.

<b>Symptoms: </b>
About once a week, the slugs change automatically, causing 404 errors. Temporarily correcting the issue involves emptying the cache and resaving the permalinks. The issue is that the slug changes from 'evenement' to 'event' or vice versa, resulting in a page not found error.

<b>Questions: </b>
How can I permanently fix the issue of slugs changing automatically?
Why has the flush rewrite code stopped working?

October 21, 2024 at 3:48 pm #16313386

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

do you have a staging environment for further tests? I suspect there might be a conflict with another 3rd party component.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please make a backup of site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Best Regards,
Marcel

October 22, 2024 at 4:14 pm #16318438

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

I noticed that you haven't set up a root page under "WPML -> Languages -> Different languages in directories." This is required if you're using the "Use directory for default language" option. For more information, please refer to this guide: WPML Documentation.

You can create an HTML file that redirects via PHP to hidden link. This is likely why the redirect workaround is no longer functioning. Please set up the root page, so we can proceed with configuring /evenement and check if it still switches to /events.

Best regards,
Marcel

October 22, 2024 at 4:43 pm #16318565

Mary

There is a root page, it's just a WordPress page instead of an HTML, but that is an option offered in the documentation you provided: https://wpml.org/documentation/getting-started-guide/language-setup/directory-default-language/

It does not appear correctly because most plugins are deactivated, but it is there. Is it hidden link and it redirects to /
And from there you can choose to go to /fr or /en

Screenshot_rootpage.jpg
October 23, 2024 at 4:16 pm #16322727

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

thanks! It seems likely that the issue is related to compatibility with the Event plugin you're using. Please note that this plugin is not certified for use with WPML, so we cannot guarantee full functionality.

To help investigate, please install the plugin on this isolated hidden link">Sandbox environment and configure it exactly as on your site. This will allow us to see if the issue occurs here as well after some time.

If we can reproduce the problem in the sandbox, we may be able to suggest a temporary workaround. However, a long-term solution would likely depend on the plugin's developers.

Best regards,
Marcel

October 23, 2024 at 9:02 pm #16323566

Mary

Ok, I installed the plugin and set it up. In the admin, you'll see I created an event in French and one in English.

October 24, 2024 at 2:55 pm #16327117

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

Thanks for the info. Let's monitor the Sandbox to see if the behavior changes. I've extended the Sandbox to prevent it from expiring over the next weeks and downloaded a copy so we can compare the tables later if needed.

Best regards,
Marcel

October 28, 2024 at 1:18 pm #16337834

Mary

Just confirming I still need assistance as I got an email asking me this (and I didn't want the ticket to close). So far, the issue has not appeared on the sandbox environment.

October 28, 2024 at 2:28 pm #16338198

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

Thanks for the information. If the issue isn't occurring on the Sandbox, it's likely related to something specific in your installation. Let’s monitor it for a few more days to see if anything changes.

Best regards,
Marcel

The topic ‘[Closed] URL slugs for each language change automatically, causing 404 errors (Part 2)’ is closed to new replies.