Skip Navigation

[Resolved] A Means of Avoiding Duplicate Slug Names

This support ticket is created 6 years, 5 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 – 10:00 - - - - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

This topic contains 5 replies, has 2 voices.

Last updated by Mohammed 6 years, 4 months ago.

Assisted by: Mohammed.

Author
Posts
#919511

Please consider rendering it impossible to have identical slug names anywhere.

This applies not to posts or pages (as this is already taken care of) but to post types, post groups/custom field groups, relationship slugs etc. I've fallen foul of this on a few occasions and there are no alerts to indicate a potential problem but then things don't work correctly and it's really difficult to troubleshoot. For example I have a post types 'listing' and 'listing review'. When I (much later) created a relationship between these two post types, I wanted a slug that was simpler than listings-listing-review' so I shortened it to 'listing-review'. It would have been really useful to have had an alert on finish asking me to change the slug. The same has happened in the past where the slug for a post group has accidentally been the same as the slug for a post type. Again an alert would have been good.

Thanks

#919853

Hi Julie,

I would consider this as a bug, not a request.
But, if this affected your website, can you please mention what happened in your case?
Did you see any error or unexpected behavior after duplicating the slugs ?

Thanks.

#919895

Oh that's a surprise!

Where the post type and post group slugs were identical there were no error messages but the posts (of that type) weren't displaying. Where the post type and relationship slugs were identical, again no error messages but entries did appear in the server-side log which were different to normal.

I'm struggling at the moment with all manner of issues since the latest upgrade and having to rebuild my sites following the sudden and unannounced withdrawal of toolset starter theme but I'm happy to create a test site to demonstrate this. If you'd like to provide private fields and set this thread up so the robot doesn't look to close it in the near future, I'll provide file & database dumps as soon as I can.

Thanks

#920691

Hi Julie,

I tried to replicate the issue on my local installation but unfortunately, I couldn't.

Can you please provide me a database dump of a website where the issue exists.
It will be nice of you if you mentioned an example where the issue exists.
Example like, relationship or posts group name and the name of the custom post type and any additional information that I can use to debug the issue.

Thanks in advance.

#922335

Hi Mohammed

I quickly set up a fresh site and tried to replicate this too so I could send you something but I couldn't replicate it either. I don't have an installation that currently has this problem because I've addressed the issues by changing the various names so that none are matching.

The issue has arisen numerous times for me as I've been developing my sites. The difficulty is that different things are affected each time and the issues are random but once I've realised that the post group name matches the (single) post type name and I correct it, the issues go away. Recently, for example, I've been unable to view all custom fields using the 'post field control' link. That has been resolved by changing post group and post type names.

In trying to replicate this for you to see, I would need to build a test site with users, sample posts, CTs and Views etc and I simply don't have time for this; the removal of toolset starter theme has cost me dearly and my focus has to be getting my new site launched. At the moment all I can say is if you think this is a bug then you must be saying it shouldn't be possible to create a post field group with the same name as a post type (in its single form) (or a relationship slug which is the same as a post type slug) but it IS possible and there are no alerts. This is easy for you to determine without extensive testing and the appropriate measures could then be put in place?

#948707

Hi Julie,

At first, please accept my apologies for the late reply.

Currently, we are working on the big changes in mostly all Toolset plugins. you see that we already published the new many to many relationships, integrated it with Toolset forms. added new functionalities to Tooslet maps like Microsoft Azure maps and other features.
So, we have a long list of features and we prioritize bug fixes so that the clients get stable versions as soon as possible.

Reporting an issue in our system requires specific procedure and the needed information to show the issue so that the developers can work on the issue efficiently.

That's why I ask you for the information that helps me to replicate the issue.

I will keep this ticket open just in case you can provide me this information. In case that the system close this ticket, you will be welcomed to open a new ticket with needed information and we will quickly address it and escalate it.

BTW, you can also provide a copy of the website where the problem exists through the duplicator plugin or all in one wp migration that will help a lot to figure out the issue.

Thanks.