Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in slug inputs, hyphen gets removed if case of -s and -t #18352

Closed
sharkfin009 opened this issue Apr 27, 2023 · 4 comments · Fixed by #18639
Closed

in slug inputs, hyphen gets removed if case of -s and -t #18352

sharkfin009 opened this issue Apr 27, 2023 · 4 comments · Fixed by #18639
Labels

Comments

@sharkfin009
Copy link
Contributor

Describe the Bug

While creating transformation presets, form validation is not allowing names like "project-thumbnail". Super minor obviously , but leaving it here for the record

To Reproduce

In the admin UI under settings, create a naming as above

Directus Version

9.25.1

Hosting Strategy

Self-Hosted (Custom)

@azrikahar azrikahar changed the title in naming transformation presets, hyphen gets removed if case of repeating letter across the hyphen in slug inputs, hyphen gets removed if case of -s and -t May 1, 2023
@azrikahar
Copy link
Contributor

azrikahar commented May 1, 2023

This should be affecting slug inputs in general, and it is a "side effect" of the latest release of the slugify package (https://github.com/sindresorhus/slugify/releases) where -s and -t (the intended fix was for 's and 't that are slugified) are sort of a false positive for our slugify use case. Transformation presets key just so happens to be one of the input with slug enabled:

In the meantime, you should be able to temporarily workaround this by using Raw Value Editor for the affected slug inputs like transformation preset key.

@leosin
Copy link

leosin commented May 13, 2023

image

did you mean this Raw Value ?
I don't quite understand

@br41nslug
Copy link
Member

@leosin
This "raw value" when entering your value in the interface.
image

@leosin
Copy link

leosin commented May 16, 2023

@leosin This "raw value" when entering your value in the interface. !

Thanks a lot, I've got the hang of it!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants