Skip Navigation

[Resolved] cannot reuse a slug previously used by a custom post type which had been deleted

This support ticket is created 4 years, 2 months 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)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by davelow 4 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#1838785

Tell us what you are trying to do?
I created a Custom Post type using toolset for an experiment and it didn't achieve what i required.
So I deleted the Custom Post Type

Now attempting to use custom fields (repeatable) for the solution.
However as I try to add the new field with a slug same as the deleted post type, it says the slug is already used.

how can I deleted the clear the slug for the deleted CPT so i can reuse it?

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#1839063

Shane
Supporter

Languages: English (English )

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

Hi Dave,

Thank you for getting in touch.

I tried to replicate this issue and i'm not able to. Can you try disabling all your non-toolset plugins and try creating the field again?

It could be that another plugin is using the same slug for something. Also can you let me know what the slug is ?

Thanks,
Shane

#1839073
Screenshot 2020-11-09 at 23.38.11.png

Hi Shane,

Thank you for the reply.
about 2 hours ago i created custom post type with slug 'business-hours', then decided it wasn't the way forward, and i deleted the custom post type.

I then tried creating Repeatable field 'Business Hours' and got the warning.

If i try to create CPT Business Hours again with the same slug, nothing happens.

#1839143

Shane
Supporter

Languages: English (English )

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

Hi Dave,

Would you mind allowing me to have admin access to the site so that I can check on this further for you ?

The private fields have been enabled for the next response.

Thanks,
Shane

#1839383

Shane
Supporter

Languages: English (English )

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

Hi Dave,

I see where the slug is still inside the database, however it can be quite difficult to remove this from the array in the database without you first making a backup.

Secondly you can always give the custom field repeatable group a different slug by simply removing the s at the end of hours and this should work as well.

Not sure what happened as it should clean up the residue data in the database once the CPT is deleted.

Please let me know if this helps.
Thanks,
Shane

#1839541

I've restored a backup copy to reverse the errors. My issue is resolved now. Thank you Shane.