Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing 404 errors when trying to recreate trashed pages with identical names and permalinks on a site using WPML. The issue does not occur when WPML is deactivated, and it does not appear on a staging site.
Solution:
We identified that the problem might be related to caching mechanisms used by WPEngine plugins on the live site. Clearing the cache resolved the issue, allowing pages to be recreated without returning a 404 error. If you're experiencing this issue, we recommend trying to clear your site's cache. Additionally, ensure that any caching plugins or systems, particularly those related to object caching, are properly configured or temporarily disabled when making such changes.

Please note that this solution might be outdated or not applicable to your specific case. If the problem 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 necessary, do not hesitate to 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.

Tagged: 

This topic contains 2 replies, has 1 voice.

Last updated by isakH-3 1 month, 1 week ago.

Assisted by: Dražen.

Author Posts
November 29, 2024 at 10:07 am #16458618

isakH-3

Background of the issue:
I am trying to re-create trashed pages with identical names. We will import posts through an API and must be able to delete and re-create the same content again.

Symptoms:
I get a 404 message in any instance where that page has previously existed with the same permalink. I've confirmed it's due to WPML by inactivating the plugin, which solves the issue. We've tested manually to create, trash then delete and re-create posts with the same content, but that doesn't work either.

Questions:
How do we fix the issue of getting a 404 error when re-creating posts with the same permalink?

November 29, 2024 at 12:40 pm #16459549

Dražen
Supporter

Languages: English (English )

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

Hello,

Thanks for contacting us.

While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.

If the post is deleted it should work fine. What happens if you do the same procedure but manually, not via API, does the issue still happens?

Regards,
Drazen

November 29, 2024 at 12:51 pm #16459570

isakH-3

It is 100% possible to recreate this manually – it's not dependent on the import function to fail whatsoever.

December 3, 2024 at 7:03 am #16469508

Dražen
Supporter

Languages: English (English )

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

Hello,

great, can you please create 1 Test page and share a link with me?

Please share the access details of your website, so I can log in and take a look.

I’m enabling a private message for the following reply.

We have strict policies regarding privacy and access to your information.

Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/


- Please backup the site files and database before providing us access. 

- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.



Thanks,
Drazen

December 5, 2024 at 7:28 am #16479417

Dražen
Supporter

Languages: English (English )

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

Hello,

I checked and could see the issue, and the reason why it happens on production but not on staging. You are using WPEngine plugins that also cache your website, I am not sure what system they use, but if it is object cache then this might be the reason.

Anyway if I clear the cache it works fine and the page does not show 404 anymore.

Regards,
Drazen

December 5, 2024 at 9:30 am #16480598

isakH-3

Thank you, disabling the WPE object cache has resolved the issue.