Skip Navigation

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

Problem:
The client is experiencing an issue where a random *__trashed* string is being added to the end of page slugs, which seems to prevent translations from working. Additionally, there is a PHP Fatal error related to the Advanced Custom Fields (ACF) plugin.
Solution:
We asked the client to provide a detailed description of what the code is intended to do, and when and where it should run. This information is crucial for us to troubleshoot the issue further. We also informed the client that

is_admin()

is not a reliable way to check if a site visitor is on the front end or back end, especially with the Gutenberg editor, as detailed in the WordPress core ticket: https://core.trac.wordpress.org/ticket/47394.

If you're experiencing a similar issue, we recommend providing as much detail as possible about your code's intentions and context. However, please note that this solution might be outdated or not applicable to your case. If the problem persists, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket with us.

For further assistance, please visit our 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.

Tagged: 

This topic contains 17 replies, has 2 voices.

Last updated by Lauren 6 months, 3 weeks ago.

Assisted by: Lauren.

Author Posts
April 25, 2024 at 1:26 pm #15565909

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Just to make sure I understand correctly, did you remove the is_admin function and now the original issue of the _trashed added to the slug is resolved - is this correct? If so, that's great.

As for the duplicate error, can you send me an error of what you are seeing in the secondary languages? Does the tranlsation show a button to "translate independently" in the Languages box? If so, try clicking that and let's see if that resolves the duplicate error.

If that doesn't work, let me know and I can look further into the duplication issue.

April 25, 2024 at 1:29 pm #15565912

mattW-28

I removed the function completely from the pre_get_posts hook. But yes, the __trashed issue is now resolved.

I believe the duplication issue, is because while the __trashed issue was happening, it was making language variants appear as duplicates, and we're just going through fixing that now.

The only outstanding issue really is another ticket I have going on, which relates to some data on the translation screens not appearing on the translated live page.

April 25, 2024 at 1:31 pm #15565919

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Okay great, I'm glad we were able to help find the cause of the initial issue. If you determine that you need assistance with the duplicate error, or anything else, please feel free to open up a new chat or ticket and we will be happy to help any way we can. Have a great rest of your day.