Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-12021

ISE trying to overwrite primary for locale when adding alias

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2021-11-29
    • None
    • Edit system
    • None

      Internal server error on https://beta.musicbrainz.org/instrument/32eca297-dde6-45d0-9305-ae479947c2a8/add-alias
      Referrer: https://beta.musicbrainz.org/instrument/32eca297-dde6-45d0-9305-ae479947c2a8/add-alias

      Internal Server Error

      Oops, something went wrong!

      Error:

      The edit could not be created. Exception (MusicBrainz::Server::Exceptions::DatabaseError): 23505 DBD::Pg::st execute failed: ERROR:  duplicate key value violates unique constraint "instrument_alias_idx_primary"
      DETAIL:  Key (instrument, locale)=(46, el) already exists. [for Statement "INSERT INTO instrument_alias (sort_name,begin_date_year,end_date_month,type,begin_date_month,end_date_day,primary_for_locale,name,instrument,begin_date_day,locale,end_date_year,ended) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?) RETURNING id" with ParamValues: 1='énchordo', 2=undef, 3=undef, 4='1', 5=undef, 6=undef, 7='1', 8='έγ�.ο�.δο', 9='46', 10=undef, 11='el', 12=undef, 13='0'] at lib/MusicBrainz/Server/Controller.pm line 82. at lib/MusicBrainz/Server/Controller.pm line 80
      Try::Tiny::try(?, ?) called at lib/MusicBrainz/Server/Controller.pm line 82
      MusicBrainz::Server::Controller::_insert_edit(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, undef, ?, ?, ?, ?, ?, ?) called at lib/MusicBrainz/Server/Controller.pm line 170
      Sql::run_in_transaction(?, ?) called at lib/MusicBrainz/Server/Model/MB.pm line 19
      MusicBrainz::Server::Model::MB::with_transaction(?, ?) called at lib/MusicBrainz/Server/Controller.pm line 184
      MusicBrainz::Server::Controller::edit_action(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) called at lib/MusicBrainz/Server/Controller/Role/EditRelationships.pm line 64
      MusicBrainz::Server::Controller::Instrument::edit_action(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) called at lib/MusicBrainz/Server/Controller/Role/Alias.pm line 112
      Catalyst::dispatch(?) called at lib/MusicBrainz/Server.pm line 390
      MusicBrainz::Server::__ANON__ at lib/MusicBrainz/Server.pm line 357
      MusicBrainz::Server::with_translations(?, ?) called at lib/MusicBrainz/Server.pm line 391
      Class::MOP::Method::Wrapped::__ANON__(?) called at lib/MusicBrainz/Server.pm line 405
      Class::MOP::Method::Wrapped::__ANON__(?) called at lib/MusicBrainz/Server.pm line 490
      
      Time: 2021-10-11T12:05:56.434Z
      
      Host: 3f4c3dcb6f13
      
      Interface language: en
      
      URL: https://beta.musicbrainz.org/instrument/32eca297-dde6-45d0-9305-ae479947c2a8/add-alias
      
      Request data:
      
      {
        "body_parameters": {
          "edit-alias.name": "έγχορδο",
          "edit-alias.period.begin_date.month": "",
          "edit-alias.edit_note": "",
          "edit-alias.period.end_date.month": "",
          "edit-alias.locale": "el",
          "edit-alias.period.end_date.year": "",
          "edit-alias.sort_name": "énchordo",
          "edit-alias.primary_for_locale": "1",
          "edit-alias.period.begin_date.day": "",
          "edit-alias.period.end_date.day": "",
          "edit-alias.period.begin_date.year": "",
          "edit-alias.type_id": "1"
        },
        "query_parameters": {}
      }
      

            reosarevok Nicolás Tamargo
            ApekattQuest, MonkeyPython MonkeyPython
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2021-11-29