Navigation überspringen

[Gelöst] Change of Slug for Custom Post Type causes error

This support ticket is created vor 5 Jahren, 6 Monaten. 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 – 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: Asia/Karachi (GMT+05:00)

Dieses Thema enthält 5 Antworten, hat 3 Stimmen.

Zuletzt aktualisiert von ThorstenS967 vor 5 Jahren, 6 Monaten.

Assistiert von: Waqar.

Author
Artikel
#1273383
articleSlug_2.jpg
articleSlug.jpg

Hi,

I have a few CPT's on the above site along with realtionships, custom fields, content templates and a lot of views ("main views" and child views). I wanted to change the slug for the CPT "Artikels" from "artikel_neu" to "artikel", but there is an error message (see attached picture "articleSlug"). This slug is not in use. If I want to change the slug for example to "a", this works, but all the views won't display anymore. This also happens if I change the option for the permalinks to manually "artikel" (see "articleSlug_2" picture ). Do you know, what is the reason for this? Maybe it's better, to take a look directly into the backend?
Thanks
Thorsten

#1273455

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Have you tried to save the permalinks after you change the post type slug?

#1273579

Yes, that didn't help. It doesn't display any article and/or view if I change the slug from "artikel_neu" to whatever else for the "Artikels" CPT. All views than display "No items found". I also refreshed the page / cleared the cache, but that didn't change anything.

#1274311

Do you have any news for me?

#1274315

Hi Thorsten,

Thanks for writing back and sharing the update.

Minesh is on a personal day-off today and I'll be following up on this ticket.

There are two important points to remember:

1. When the slug of a CPT (custom post type) is successfully changed/updated, any View or post form that was set to use that CPT earlier will need to be updated to select that post type again.

Please go to the edit screen of each View or Post form that was associated with the CPT "Artikels" and you'll see that no CPT will be selected in there. You can select that CPT again and they should work.

2. As for the message that the "artikel" slug is already in use, please check the slugs of all other CPTs, regular pages, custom taxonomies, and their terms. If any one of these items already has this slug, you won't be able to set it for this CPT.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1274527

Your first point was the one, that helped me and solved the problem! Thanks a lot Waqar!