Skip Navigation

[Resuelto] Cannot Edit Post Type – Keeps saying slug already used

This support ticket is created hace 7 años, 6 meses. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 9 respuestas, has 3 mensajes.

Last updated by Nigel hace 3 años.

Assisted by: Nigel.

Autor
Mensajes
#448937
Screenshot 2016-10-20 16.51.50.png

I am to go edit my Restaurants Post Type so I can add Author section.

When I check on author and then click save it won't allow me to save because it says slug already used. But I don't want to change the slug.

I want to keep everything the same except adding new section which is Author section.

This is edit not adding new CPT. It's kind weird because I used to edit everything else fine before.

Please help.

Thanks,
JSon

#449081

Nigel
Supporter

Languages: Inglés (English ) Español (Español )

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

Hi Json

I'm having trouble reproducing this issue.

Can you clarify something?

Is it only when you try to check the author option and re-save the custom post type that you get the slug error?

Or does it happen if you try to make any kind of changes to the post type and save?

#449249

Hello Nigel,

Sorry if it confusing. ?

Here is navigation I go to edit post type so that I want Author selection tick.

Toolset > Edit Post Types > Sections to display when editing > tick author then save.

After click save it echo errors message "You cannot use this slug because it is already used or a reserved word. Please choose a different slug."

I don't want slug to change. I just want to have option to select/change author at post edit. I didn't tick on author when I created this post types. Now I just want to edit and update.

I just want to add that is ONLY happen to one specific post type which is Restaurants. I tried with other post types it works.????

Thanks,
JSon

#449859

Nigel
Supporter

Languages: Inglés (English ) Español (Español )

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

Hi JSon

Thanks for the update.

I can understand what you are trying to do, but cannot account for why you are unable to.

I think it would help if I took a look at your site myself.

I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site, even though I don't intend to make any changes other than possibly to temporarily add a backup plugin to take a snapshot of the site.

#449860

Nigel
Supporter

Languages: Inglés (English ) Español (Español )

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

Sorry JSon, I hit send before selecting private for your reply, which I now have.

#450134

Nigel
Supporter

Languages: Inglés (English ) Español (Español )

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

Hi JSon

I'm at a loss to explain the problem.

I have looked through your site and your settings and I cannot see where a conflict over the slug would be coming from.

Do you have a dev server you can use for testing, rather than the live site?

Could you change the slug? To 'restaurant' for example, and see if you can then save edits?

You would need to check if you have used the 'restaurants' slug anywhere in custom code or shortcodes and update those, too.

If that is not possible let me know and I may take a copy of the site for local testing.

#450137

Nigel
Supporter

Languages: Inglés (English ) Español (Español )

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

Hello again JSon

Never mind.

I found the culprit, which is that you have a standard WordPress page with the same slug (restaurants). I modified the slug of that page which freed up the settings page for the restaurants CPT, which you can now save.

#450726

Hello Nigel,

Thank you that solved it. 🙂

#2005497

Hi, I have this same issue. I have a slug that's a child to another page named the same as a CPT.

/company/press-releases/

CPT
/press-releases/

I cannot save this post type now unless I change it from press-releases

I have confirmed that if I change the page /investor/press-releases/ to something else, that I am able to save.

Is this correct or is this a bug? Is there a work around? temp change the press-releases page? or do i need to keep child page name different as well?

#2007111

Nigel
Supporter

Languages: Inglés (English ) Español (Español )

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

@brent it's not possible to have a CPT and page use the same slug, otherwise WordPress cannot tell whether site.com/press-releases/ should display the page or the archive of the Press Releases post type.

In your case the conflict doesn't actually arise, because the press-releases page is actually a child page, and includes the parent page in the URL, but I guess the mechanism to detect potential conflicts misses that nuance.

But it does mean you would either need to temporarily rename your page to edit the CPT, yes, or you could change the slug of the CPT to press-release (singular), which is the common pattern (so that individual releases have a url such as site.com/press-release/new-ceo-announced/.

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