Skip to content

Bulk-add tags sometimes fails #1707

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

Open
shish opened this issue Apr 7, 2025 · 0 comments
Open

Bulk-add tags sometimes fails #1707

shish opened this issue Apr 7, 2025 · 0 comments

Comments

@shish
Copy link
Owner

shish commented Apr 7, 2025

(Copy-pasting from an email I got sent so it doesn't get lost)

Using the tag widget in the sidebar "bulk actions" panel. Sometimes, though confusingly not all the time, it'll choke if told to add (as opposed to replace) a tag but one of the target posts already has the tag. One example is trying to add the AI-generated tag to this search, which yields this:
Internal Error

Message: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "image_tags_image_id_key" DETAIL: Key (image_id, tag_id)=(5800567, 661176) already exists.

Query: INSERT INTO image_tags(image_id, tag_id) VALUES (5800567, 661176), (5800567, 661176), (5800567, 926), (5800567, 678159), (5800567, 4486)

Args: array ( )

Version: 2.11.4 (on 8.2.26)

Stack Trace:

#0 /app/core/database.php(230): Shimmie2\Database->_execute()
#1 /app/core/imageboard/image.php(599): Shimmie2\Database->execute()
#2 /app/ext/post_tags/main.php(173): Shimmie2\Image->set_tags()
#3 /app/core/send_event.php(165): Shimmie2\PostTags->onTagSet()
#4 /app/ext/bulk_actions/main.php(289): Shimmie2\send_event()
#5 /app/ext/bulk_actions/main.php(149): Shimmie2\BulkActions->tag_items()
#6 /app/core/send_event.php(165): Shimmie2\BulkActions->onBulkAction()
#7 /app/ext/bulk_actions/main.php(186): Shimmie2\send_event()
#8 /app/core/send_event.php(165): Shimmie2\BulkActions->onPageRequest()
#9 /app/index.php(91): Shimmie2\send_event()
#10 {main}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant