Duplicate Slugs

So after hours debugging a certain issue and fighting with bubble’s super slow updates, I realzied that the issue occured because I have 2 records of the same type with the same slug.

That’s not supposed to happen right? How do I prevent that going forward? If I can’t rely on a slug’s unqiness then I have to create a whole host of tables and workflows to check on the slugs or just leave bubble. Please help if you ahve any ideas how to ensure the DB isn’t generating duplicate slugs…

How are you generating your slugs?

Indeed, that’s not supposed to happen. You probably already checked this, but is there a hidden character in one of the slugs?

Certainly file a bug report.

@ihsanzainal84 I’m generating slugs in a API Workflow (not checking if it’s a valid slug first).

@rico.trevisan No hidden charachter in either slug; both are generated from a GUID on the user which only contains non special charachters…

I have a simple action in my wokflow that will :append a slug if it already exists.

If you are concerned about speed and you have a lot of fields in the Thing you want to set the slug in, you can always create a new “Slug Index” Thing to keep track of slugs in use and check against that.

1 Like

Now this is an awesome idea! :wink:

Perhaps you should. Bubble provides conditions specifically for that.

Still, I would have expected Bubble to automatically make them unique, as described in the docs; so I agree with @rico.trevisan that the issue should be reported.

This topic was automatically closed after 14 days. New replies are no longer allowed.