manyfold icon indicating copy to clipboard operation
manyfold copied to clipboard

Upload with tags with tag with a hyphen symbol creates multiple tags

Open AevumDecessus opened this issue 1 year ago • 3 comments

Describe the bug If you tag a model in the upload dialog with a tag containing a hyphen character, it creates the tags as expected, but also creates a tag with the hyphen character replaced with a space character

To Reproduce Steps to reproduce the behavior:

  1. Add models to the upload dialog
  2. Tag the models, with at least one tag having a - symbol in it
  3. Finish uploading the model

Expected behavior The model to be uploaded, and tagged as tagged in the upload dialog

Screenshots Tags in upload dialog image

Tags applied to models image

Additional context The double-sided tag in the upload dialog created a double-sided tag as expected, but also a double sided tag that is applied to most of the models

AevumDecessus avatar Sep 18 '24 14:09 AevumDecessus

This is on the v0.79.0 linuxserver image

AevumDecessus avatar Sep 18 '24 14:09 AevumDecessus

Ooh! Interesting! Does it do the same thing in the general editing page?

Floppy avatar Sep 18 '24 15:09 Floppy

I checked; it doesn't.

Floppy avatar Sep 18 '24 15:09 Floppy

OK, I think I understand why this is happening. When the model is created, it's given the right set of tags, but when it's then scanned, and path template parsing is enabled, it will read the folder names back in and apply them as tags. That should normally be fine, because the folder was created because of the original tag, but in the case where there's a hyphen, the default folder-to-tag behaviour is to remove the hyphen when creating a tag.

This is because both of the tags hello-world and hello world will convert to hello-world on disk.

Hmmm. This has similar problems to capitalisation of tags and folder name safety, in #3735 and #3742.

Floppy avatar Apr 17 '25 14:04 Floppy

good to know, makes sense now that you've explained it, fairly trivial to just avoid hyphens in tag names to not run into this

AevumDecessus avatar Apr 22 '25 17:04 AevumDecessus