Skip to content

Rare error when updating a word with tags #120

@HenryWales

Description

@HenryWales

I have edited many words with tags before first seeing this error. I don't know what can be making it happen sometimes and sometimes not. Most of the time it appears to work as expected.


Fatal Error in SQL Query: INSERT INTO tags (TgText) VALUES('some_tag')

Error Code & Message: [1062] Duplicate entry 'some_tag' for key 'TgText'

Backtrace:

#0 C:\xampp\htdocs\lwt\inc\database_connect.php(57): do_mysqli_query('INSERT INTO tag...')
#1 C:\xampp\htdocs\lwt\inc\session_utility.php(278): runsql('INSERT INTO tag...', '')
#2 C:\xampp\htdocs\lwt\edit_words.php(666): saveWordTags(7034)

This leads to some_tag being removed as a tag for the word.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdatabaseDatabase-related issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions