UniqueSlugs Addon - bugfix and new localized slugs

I realized, that the UniqueSlugs addon never really worked, if more than one duplicates existed. Stupid mistake…

$entries = $app->module('collections')->count($name, [$slugName => $slug]);

The code above never counted the auto-generated slugs with numeric suffixes.

If you use this addon, you should update to the latest version, that now has support for localized slugs, too.

See this discussion for some more background #1086 and/or check the readme.

1 Like

Today I found and fixed another important bug. If you update only partial data of an entry via api or via custom php script, the slug can be overwritten to the default placeholder. If you use the admin interface, everthing works fine.

1 Like

Hello,
Is it possible to remove diacritics when generating slug? Or even better substitute them like this:
ș to s
ț to t
ă to a
â to a
î to i
And ofcourse te uppercase versions of the diacritics…

Thank you

Yes. The addon uses this sluggify function:

Be aware, that this addon is not compatible with Cockpit CMS v2,