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

Events: Event series having both katakana/hiragana name variants disallows creating events #1804

Open
3 of 7 tasks
saturclay opened this issue Aug 20, 2024 · 6 comments
Open
3 of 7 tasks
Labels
adding/editing entries Adding/Editing entries (artists, songs, albums, tags, song lists, events) bug/error Bugs and errors (timeout) complexity: unknown Unknown days of work content: events Event entries priority: low Issues/Tasks that are not so important

Comments

@saturclay
Copy link
Contributor

Website (required)

[VocaDB / UtaiteDB / TouhouDB]

Describe the bug (required)

When you try to create an event for an event series where the series' name has both a katakana and hiragana variant (that are otherwise identical), then you'll get a "bad request" notification and be told the event name is already in use (even though it isn't) by event ID X (with X being the next unused event value).

Steps to reproduce the behavior:

  1. Go to this example on the beta site.
  2. Attempt to create an event in the series.
  3. See the "bad request" text and error message (this was from the event series on TouhouDB, which I've now fixed):
    Screenshot 2024-08-20 at 1 29 10 PM

Each time you hit save, the event ID increases by 1. This doesn't actually create an event though, and the audit log won't show any activity, nor will the ID appear in the data dump.

If you just remove the hiragana name, then it becomes possible to create events. Of course, the expected behavior would be to be able to create the event either way. However, this is a pretty odd circumstance and it seems pretty low priority now that I know what the problem was, so for the time being, I just want it to be known that this issue exists, in case such a circumstance happens again.

Checklist (required)

Fill out the checklist. Use strikethroughs or leave fields empty if you don't know or are unable to check/test.

  • Searched VocaDB/vocadb for duplicate issues.
  • Tested on the beta site.
  • Tested on different browsers (e.g. Firefox, Chrome, Safari, Edge).
  • Checked in private mode.
  • Cleared browser cache and cookies.
  • Checked the DevTools console.
  • Checked the syslog (mods+ only).
@saturclay saturclay added the bug/error Bugs and errors (timeout) label Aug 20, 2024
@saturclay
Copy link
Contributor Author

Also, I just checked whether it happens across the board with characters that are interpreted as being the same for search purposes, but it looks like this doesn't happen for, say, "event w" with the alias "event v", only for event series with the same hiragana/katakana name.

@andreoda andreoda added content: events Event entries adding/editing entries Adding/Editing entries (artists, songs, albums, tags, song lists, events) priority: low Issues/Tasks that are not so important complexity: unknown Unknown days of work labels Aug 21, 2024
@andreoda andreoda changed the title [Bug report] Event series having both katakana/hiragana name variants disallows creating events Event series having both katakana/hiragana name variants disallows creating events Aug 21, 2024
@Susko3
Copy link
Collaborator

Susko3 commented Aug 21, 2024

Katakana and hiragana don't really matter. You could have an event series with all three names set to the same thing and it still fails.

image

image

@Susko3
Copy link
Collaborator

Susko3 commented Aug 21, 2024

The problem also isn't with the event series, as the same issue can be reproduced when adding a standalone event. If any of the three names or aliases match (normalise to the same string) then the event can't be created.

image

@Susko3
Copy link
Collaborator

Susko3 commented Aug 21, 2024

This is currently working as intended:

/// Duplicate names are not allowed in the list of given names for a single event, and no two events may have the same name.

The odd things are:

  1. Duplicate names are allowed on other entry types (I checked artists, and importantly, event series)
  2. When creating an event and a duplicate name is given, a new ID is allocated, but it leads to a 404

@FinnRG
Copy link
Member

FinnRG commented Aug 21, 2024

@Susko3

  1. Tags would be an example of another entry type where every name needs to be unique
  2. The ID allocation is just the way SQL DBs handle serial integers. The event is inserted as a transaction, this advances the series, then the transaction gets aborted and the insertion gets rolled back, but not the integer series. This is completely as intended. (So no event is actually ever created with the new ids)

So the core question here is if we should remove the unique name requirements for events and their event series. For that it might be good to know why this rule exists in the first place. @Shiroizu or @andreoda might know more about this.

@Susko3
Copy link
Collaborator

Susko3 commented Oct 27, 2024

I ran into this problem (no duplicate event names) again, when adding Digital Stars @ Miku Expo 2024 in Berlin. It was a duplicate of some of the other Digital Stars event, likely due to the same series number (2024). I worked around that by first setting the series number to 20241.

@andreoda andreoda changed the title Event series having both katakana/hiragana name variants disallows creating events Events: Event series having both katakana/hiragana name variants disallows creating events Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adding/editing entries Adding/Editing entries (artists, songs, albums, tags, song lists, events) bug/error Bugs and errors (timeout) complexity: unknown Unknown days of work content: events Event entries priority: low Issues/Tasks that are not so important
Projects
Development

No branches or pull requests

4 participants