Skip Navigation

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

Problem: All the posts related to the Custom Post Type "article" are returning a 404 error. Solution: The issue was caused by some old strings in the String Translation tables. Searching for the "article" string in WPML -> String Translation and removing the old strings solved the issue.

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 12 replies, has 2 voices.

Last updated by Kristof 4 years ago.

Assigned support staff: Vincenzo.

Author Posts
September 15, 2017 at 7:51 am

Kristof

I am trying to: visit web page hidden link

I expected to see: the webpage

Instead, I got: 404 Page not found

September 15, 2017 at 8:10 am #1372928

Kristof

Here is what we already did
- resave Permalinks
- recreate .htaccess file
- flushed Cloudflare, cPanel and W3TC caches
- Troubleshooting > Clear the cache in WPML
- Troubleshooting > Remove ghost entries from the translation tables
- Troubleshooting > Set language information
- Troubleshooting > Fix post type assignment for translations

Nothing works! This is urgent as the site is practically down as no web pages load.

UPDATE: the issue is only present for the CPT "Articles", CPT Books are fine and normal WP pages also.

September 15, 2017 at 10:27 am #1373142

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello, thank you for contacting WPML Support!
I will take care of your ticket.

It is possible that the translated string is not working correctly.
Try these steps:
❌ Before proceeding please make a full website backup! ❌
- Temporarily disable all the cache
- Go to WPML -> String Translation
- Search for the "Article" string. See the attached screenshot
- Delete all the strings shown in the screenshot
- Update the Post type
- Translate the slug in WPML -> Translation Management -> Multilingual Content Setup

Please let me know if this solves the issue or if you need further details.

Thank you

String-translations-slug.png
September 15, 2017 at 11:45 am #1373264

Kristof

Hi,
I followed each step closely but it did not resolve the issue, a link to an article still returns a 404.
hidden link
hidden link

September 15, 2017 at 1:07 pm #1373378

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello,

to further debug the problem I’d like to replicate your site locally.

I would need a site snapshot if possible.
We usually recommend the free Plugin “Duplicator” for this purpose.

If you already know how Duplicator works
(http://wordpress.org/plugins/duplicator/),
please skip the following steps and just send me the installer file and the zipped package you downloaded.

★ Duplicator Instructions
hidden link
https://wpml.org/faq/provide-supporters-copy-site/

If the file is too large (more than 200M), please use the Duplicator file filters to remove the cache, the wp-uploads directory, the media and the archive files.

Send me both files (you probably want to use Google Drive, DropBox, or similar services, as the snapshot file will be quite big)

Your next reply will be private, which means that only you and I will be able to see it and have access to it. You can paste the links to the files there. You can also share the credentials to your website. I will then download the files from the admin panel.
Once the problem is resolved I will delete the local site.

Thank you

September 15, 2017 at 1:13 pm
September 15, 2017 at 2:41 pm #1373539

Kristof

Hi Vincenzo,
We just found out that the issue is gone when we disable the String Translation plugin. However, we really need this plugin to translate some custom strings.
Hope this helps you in finding a solution.

September 15, 2017 at 6:14 pm #1373762

Kristof

Come on guys, this is taking (too) long 🙁

September 17, 2017 at 11:56 am #1374358

Kristof

2 days later ... still no answer.

September 18, 2017 at 8:56 am #1374847

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello,

I'm really sorry for the delay.
I managed to solve the issue in my local copy of the website.
The issue seems caused by some old strings in the String Translation tables.

In a few minutes, I will send you the exact steps to solve this issue in your website.
- I am going to test this again just to be safe.

In the meantime, please make a full website backup, especially the database.
⌥ You can use Duplicator for this

Thanks for your patience

September 18, 2017 at 9:38 am #1374891

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello,

here are the steps to fix the issue:

❌ Before proceeding please make a full website backup! ❌
1. Search for all the instances of the "article" string in the value column in the icl_string_translations table.
- In my local database, the id of the 2 strings is 28901 and 44067

2. Select the 2 rows (select only the strings that are all in lower case "article")

3. Delete the 2 rows

Please let me know if this solves the issue or if you need further details.

Thank you

September 18, 2017 at 10:19 am #1374944

Kristof

Ciao Vincenzo,
this seems to have fixed the issue. If this should ever happen again, can we fix this ourselves, and how?

September 18, 2017 at 10:26 am #1374953

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello,

I'm glad to know that the issue is solved.
This is a very rare issue. I tried reproducing it in a fresh install but I was not able.
Your hint about disabling String Translation helped.

I searched for the slug string in the database, inside the String Translation tables, and I found those 2 strings set in the wrong language.

For more details about our tables check the attached documentation.

If the issue should happen again, please open a new ticket and add a link to this ticket to the problem description.

Thank you.

Related documentation:
https://wpml.org/documentation/support/wpml-tables/

September 18, 2017 at 11:07 am #1375013

Kristof

actually, the slug for FR and EN is the same "article"