Skip Navigation

[Resolved] Translated url slugs now all throw a 404 not found for CPT "Books"

This support ticket is created 7 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 12 replies, has 2 voices.

Last updated by kristofG 7 years ago.

Assisted by: Shane.

Author
Posts
#506312

I am trying to: view a page

I visited this URL: hidden link

I expected to see: the detail page of this book

Instead, I got: a 404 Page not found

We use WPML for "Use different slugs in different languages for Books." So in English we have urls like /en/books/abc, in Dutch /nl/boek/abc and in French /fr/livre/abc. All Dutch book urls are fine, but all book urls in EN/FR give a 404 Page not found.

#506396

Shane
Supporter

Languages: English (English )

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

Hi Kristof,

Thank you for contacting our support forum.

Would you mind providing me with admin access to your website so that I can have a look at this ?

Thanks,
Shane

#506406
#506473

Shane
Supporter

Languages: English (English )

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

Hi Kristof,

None of these aren't working even the site url.

However for issue that are caused by translation it would be best to open a ticket with our WPML team as well, as they are better trained to handle these issues.

Thanks,
Shane

#506606

What do you get then, when you visit the site url? A 404? That indicates the problem here.

#506909

Shane
Supporter

Languages: English (English )

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

Screen Shot 2017-03-28 at 10.09.13 AM.png

Hi Kristof,

This is what I'm seeing.

Thanks,
Shane

#506923

I see in the upper left corner ...itinerainst/, what url is that? You'll need hidden link like in my original post at the top and hidden link for the admin.

#507022

Shane
Supporter

Languages: English (English )

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

Hi Kristof,

The posts should now start to work.

What I did was to modify the Book CPT Rewrite rules to allow it to have custom urls.

This setting can be found on the Edit CPT page under the Options section.

Thanks
Shane

#507027
Screenshot_4.png
Screenshot_3.png

Do you mean this setting? see screenshot 3.

What was it set to before? And why did it work before and then stopped working until you just now changed that setting?

Because the CPT Article is set to "Use the normal WordPress URL logic" (screenshot 4) and those translations work perfectly. We have /nl/artikel and /fr/article/ and that just works.

#507047

Shane
Supporter

Languages: English (English )

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

Hi Kristof,

It seems that changing this setting was able to refresh the permalinks for the CPT so that the new structure was recognised.

Sometimes when altering permalink structures they will need to be refreshed in order for the new structure to resolve correctly.

Thanks,
Shane

#507183

Hi Shane,

We know that we best resave the Permalinks after changes, but we did not alter permalinks in any way. Unless a plugin/theme might have done this.

#507413

Shane
Supporter

Languages: English (English )

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

Hi Kristof,

The using of the different domain per language caused the urls the change by adding the en/fr/ to the url.

Thanks,
Shane

#507659

Oh, glad that you figured that out. I would have never have linked that change to our 404 url issue.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.