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

Internal server error adding a second place alias as primary

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2013-10-28
    • None
    • None
    • None

      I accidentally tried to add a second place alias as primary for the locale when one already has primary set for that locale and got

      Fehler:

      Caught exception in MusicBrainz::Server::Controller::Place->add_alias "The edit could not be created.
      POST: $VAR1 =

      Unknown macro: { 'edit-alias.period.end_date.year' => '', 'edit-alias.period.end_date.day' => '', 'edit-alias.period.begin_date.month' => '', 'edit-alias.period.begin_date.year' => '', 'edit-alias.as_auto_editor' => '1', 'edit-alias.edit_note' => '', 'edit-alias.period.end_date.month' => '', 'edit-alias.type_id' => '1', 'edit-alias.locale' => 'en', 'edit-alias.sort_name' => 'Wel City Tokyo', 'edit-alias.primary_for_locale' => '1', 'edit-alias.name' => 'Wel City Tokyo', 'edit-alias.period.begin_date.day' => '' }

      ;

      Exception:$VAR1 = 'DBD::Pg::st execute failed: ERROR: duplicate key value violates unique constraint "place_alias_idx_primary"
      DETAIL: Key (place, locale)=(1051, en) already exists. at lib/Sql.pm line 440, line 3.
      at lib/Sql.pm line 455, line 3.
      Sql::_ANON_("DBD::Pg::st execute failed: ERROR: duplicate key value viola"...) called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 100
      Try::Tiny::try(CODE(0x14f47480), Try::Tiny::Catch=REF(0x1481a0e0)) called at lib/Sql.pm line 456
      Sql::_select_list(Sql=HASH(0x10865040), "INSERT INTO place_alias (begin_date_day,primary_for_locale,na"..., ARRAY(0x14f78ad0), "arrayref", CODE(0x5b51bc8)) called at lib/Sql.pm line 475
      Sql::select_list_of_lists(Sql=HASH(0x10865040), "INSERT INTO place_alias (begin_date_day,primary_for_locale,na"..., undef, 1, "Wel City Tokyo", 1051, "en", undef, 0, ...) called at lib/Sql.pm line 408
      Sql::select_single_column_array(Sql=HASH(0x10865040), "INSERT INTO place_alias (begin_date_day,primary_for_locale,na"..., undef, 1, "Wel City Tokyo", 1051, "en", undef, 0, ...) called at lib/Sql.pm line 423
      Sql::select_single_value(Sql=HASH(0x10865040), "INSERT INTO place_alias (begin_date_day,primary_for_locale,na"..., undef, 1, "Wel City Tokyo", 1051, "en", undef, 0, ...) called at lib/Sql.pm line 150
      Sql::insert_row(Sql=HASH(0x10865040), "place_alias", HASH(0x14e1b3e8), "id") called at lib/MusicBrainz/Server/Data/Alias.pm line 164
      MusicBrainz::Server::Data::Alias::insert(Moose::Meta::Class::_ANON_::SERIAL::335=HASH(0xf28ad50), HASH(0x14df8178)) called at lib/MusicBrainz/Server/Edit/Alias/Add.pm line 69
      MusicBrainz::Server::Edit::Alias::Add::insert(MusicBrainz::Server::Edit::Place::AddAlias=HASH(0x14f79040)) called at lib/MusicBrainz/Server/Data/Edit.pm line 436
      MusicBrainz::Server::Data::Edit::create(MusicBrainz::Server::Data::Edit=HASH(0xc7dd4e0), "editor_id", 53705, "privileges", 441, "primary_for_locale", 1, "name", "Wel City Tokyo", ...) called at lib/MusicBrainz/Server/Controller.pm line 89
      MusicBrainz::Server::Controller::_ANON_() called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 76
      eval

      Unknown macro: {...}

      called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 67
      Try::Tiny::try(CODE(0x14f78998), Try::Tiny::Catch=REF(0x14f76170)) called at lib/MusicBrainz/Server/Controller.pm line 105
      MusicBrainz::Server::Controller::_insert_edit(MusicBrainz::Server::Controller::Place=HASH(0xdab1610), MusicBrainz::Server=HASH(0x104c6db8), MusicBrainz::Server::Form::Alias=HASH(0x10bff3f8), "edit_type", 66, "name", "Wel City Tokyo", "locale", "en", ...) called at lib/MusicBrainz/Server/Controller.pm line 144
      MusicBrainz::Server::Controller::_ANON_() called at lib/Sql.pm line 307
      Sql::_ANON_() called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 76
      eval

      called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 67
      Try::Tiny::try(CODE(0x14f78f20), Try::Tiny::Catch=REF(0x14f78aa0)) called at lib/Sql.pm line 320
      Sql::_auto_transaction(CODE(0x14f784d0), Sql=HASH(0x10865040)) called at lib/Sql.pm line 325
      Sql::_run_in_transaction_one(CODE(0x14f784d0), Sql=HASH(0x10865040)) called at lib/Sql.pm line 339
      Sql::run_in_transaction(CODE(0x14f784d0), Sql=HASH(0x10865040)) called at lib/MusicBrainz/Server/Model/MB.pm line 19
      MusicBrainz::Server::Model::MB::with_transaction(MusicBrainz::Server::Model::MB=HASH(0xc0c8a58), CODE(0x14f784d0)) called at lib/MusicBrainz/Server/Controller.pm line 155
      MusicBrainz::Server::Controller::edit_action(MusicBrainz::Server::Controller::Place=HASH(0xdab1610), MusicBrainz::Server=HASH(0x104c6db8), "form", "Alias", "form_args", HASH(0x1073ad48), "type", 66, "edit_args", ...) called at lib/MusicBrainz/Server/Controller/Role/Alias.pm line 89
      MusicBrainz::Server::Controller::Role::Alias::add_alias(MusicBrainz::Server::Controller::Place=HASH(0xdab1610), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute(Catalyst::Action=HASH(0xde84fe0), MusicBrainz::Server::Controller::Place=HASH(0xdab1610), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/Catalyst.pm line 1687
      eval

      Unknown macro: {...}

      called at /home/beta/perl5/lib/perl5/Catalyst.pm line 1687
      Catalyst::execute(MusicBrainz::Server=HASH(0x104c6db8), "MusicBrainz::Server::Controller::Place", Catalyst::Action=HASH(0xde84fe0)) called at /home/beta/perl5/lib/perl5/Catalyst/Plugin/StackTrace.pm line 93
      Catalyst::Plugin::StackTrace::execute(MusicBrainz::Server=HASH(0x104c6db8), "MusicBrainz::Server::Controller::Place", Catalyst::Action=HASH(0xde84fe0)) called at /home/beta/perl5/lib/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch(Catalyst::Action=HASH(0xde84fe0), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/Catalyst/ActionChain.pm line 41
      Catalyst::ActionChain::dispatch(Catalyst::ActionChain=HASH(0xfea7f18), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/Catalyst/Controller.pm line 158
      Catalyst::Controller::_ACTION(MusicBrainz::Server::Controller::Place=HASH(0xdab1610), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute(Catalyst::Action=HASH(0xde81790), MusicBrainz::Server::Controller::Place=HASH(0xdab1610), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/Catalyst.pm line 1687
      eval

      called at /home/beta/perl5/lib/perl5/Catalyst.pm line 1687
      Catalyst::execute(MusicBrainz::Server=HASH(0x104c6db8), "MusicBrainz::Server::Controller::Place", Catalyst::Action=HASH(0xde81790)) called at /home/beta/perl5/lib/perl5/Catalyst/Plugin/StackTrace.pm line 93
      Catalyst::Plugin::StackTrace::execute(MusicBrainz::Server=HASH(0x104c6db8), "MusicBrainz::Server::Controller::Place", Catalyst::Action=HASH(0xde81790)) called at /home/beta/perl5/lib/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch(Catalyst::Action=HASH(0xde81790), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward(Catalyst::Dispatcher=HASH(0x4ccb450), "forward", MusicBrainz::Server=HASH(0x104c6db8), "_ACTION") called at /home/beta/perl5/lib/perl5/Catalyst/Dispatcher.pm line 237
      Catalyst::Dispatcher::forward(Catalyst::Dispatcher=HASH(0x4ccb450), MusicBrainz::Server=HASH(0x104c6db8), "_ACTION") called at /home/beta/perl5/lib/perl5/Catalyst.pm line 373
      Catalyst::forward(MusicBrainz::Server=HASH(0x104c6db8), "_ACTION") called at /home/beta/perl5/lib/perl5/Catalyst/Controller.pm line 132
      Catalyst::Controller::_DISPATCH(MusicBrainz::Server::Controller::Place=HASH(0xdab1610), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute(Catalyst::Action=HASH(0xddeb1d0), MusicBrainz::Server::Controller::Place=HASH(0xdab1610), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/Catalyst.pm line 1687
      eval

      Unknown macro: {...}

      called at /home/beta/perl5/lib/perl5/Catalyst.pm line 1687
      Catalyst::execute(MusicBrainz::Server=HASH(0x104c6db8), "MusicBrainz::Server::Controller::Place", Catalyst::Action=HASH(0xddeb1d0)) called at /home/beta/perl5/lib/perl5/Catalyst/Plugin/StackTrace.pm line 93
      Catalyst::Plugin::StackTrace::execute(MusicBrainz::Server=HASH(0x104c6db8), "MusicBrainz::Server::Controller::Place", Catalyst::Action=HASH(0xddeb1d0)) called at /home/beta/perl5/lib/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch(Catalyst::Action=HASH(0xddeb1d0), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward(Catalyst::Dispatcher=HASH(0x4ccb450), "forward", MusicBrainz::Server=HASH(0x104c6db8), "/place/_DISPATCH") called at /home/beta/perl5/lib/perl5/Catalyst/Dispatcher.pm line 237
      Catalyst::Dispatcher::forward(Catalyst::Dispatcher=HASH(0x4ccb450), MusicBrainz::Server=HASH(0x104c6db8), "/place/_DISPATCH") called at /home/beta/perl5/lib/perl5/Catalyst.pm line 373
      Catalyst::forward(MusicBrainz::Server=HASH(0x104c6db8), "/place/_DISPATCH") called at /home/beta/perl5/lib/perl5/Catalyst/Dispatcher.pm line 105
      Catalyst::Dispatcher::dispatch(Catalyst::Dispatcher=HASH(0x4ccb450), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/Catalyst.pm line 1633
      Catalyst::dispatch(MusicBrainz::Server=HASH(0x104c6db8)) called at lib/MusicBrainz/Server.pm line 330
      MusicBrainz::Server::_ANON_() called at lib/MusicBrainz/Server.pm line 304
      MusicBrainz::Server::with_translations(MusicBrainz::Server=HASH(0x104c6db8), CODE(0x13ea3890)) called at lib/MusicBrainz/Server.pm line 331
      Class::MOP::Class:::around(CODE(0x3f7e998), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 162
      Class::MOP::Method::Wrapped::_ANON_(MusicBrainz::Server=HASH(0x104c6db8)) called at lib/MusicBrainz/Server.pm line 345
      Class::MOP::Class:::around(CODE(0xe0079f8), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 162
      Class::MOP::Method::Wrapped::_ANON_(MusicBrainz::Server=HASH(0x104c6db8)) called at lib/MusicBrainz/Server.pm line 390
      Class::MOP::Class:::around(CODE(0xe008058), MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 162
      Class::MOP::Method::Wrapped::_ANON_(MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 35
      Class::MOP::Method::Wrapped::_ANON_(MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 91
      MusicBrainz::Server::dispatch(MusicBrainz::Server=HASH(0x104c6db8)) called at /home/beta/perl5/lib/perl5/Catalyst.pm line 1992
      Catalyst::_ANON_() called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 76
      eval

      called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 67
      Try::Tiny::try(CODE(0xff13610), Try::Tiny::Catch=REF(0x10568608)) called at /home/beta/perl5/lib/perl5/Catalyst.pm line 1998
      Catalyst::handle_request("MusicBrainz::Server", "env", HASH(0xf246cf0), "response_cb", CODE(0xfe9b138)) called at /home/beta/perl5/lib/perl5/Catalyst/Plugin/AutoRestart.pm line 117
      Catalyst::Plugin::AutoRestart::handle_request("MusicBrainz::Server", "env", HASH(0xf246cf0), "response_cb", CODE(0xfe9b138)) called at /home/beta/perl5/lib/perl5/Catalyst/Engine.pm line 697
      Catalyst::Engine::_ANON_(CODE(0xfe9b138)) called at /home/beta/perl5/lib/perl5/Plack/Handler/FCGI.pm line 136
      Plack::Handler::FCGI::run(Plack::Handler::FCGI=HASH(0x2062ab8), CODE(0xe030d28)) called at /home/beta/perl5/lib/perl5/Plack/Loader.pm line 84
      Plack::Loader::run(Plack::Loader=HASH(0x2039eb0), Plack::Handler::FCGI=HASH(0x2062ab8)) called at /home/beta/perl5/lib/perl5/Plack/Runner.pm line 277
      Plack::Runner::run(Plack::Runner=HASH(0x1dd7600)) called at /home/beta/perl5/bin/plackup line 10
      ';
      at lib/MusicBrainz/Server/Controller.pm line 105.
      at lib/Sql.pm line 320."

      Stack-Trace:
      line 19 MusicBrainz::Server::Model::MB
      line 155 MusicBrainz::Server::Controller
      line 89 MusicBrainz::Server::Controller::Role::Alias
      line 330 MusicBrainz::Server
      line 304 MusicBrainz::Server
      line 331 MusicBrainz::Server
      line 345 MusicBrainz::Server
      line 390 MusicBrainz::Server

      Anfragedaten:
      $VAR1 = {
      'query_parameters' => {},
      'body_parameters' =>

      Unknown macro: { 'edit-alias.period.end_date.year' => '', 'edit-alias.period.end_date.day' => '', 'edit-alias.period.begin_date.month' => '', 'edit-alias.period.begin_date.year' => '', 'edit-alias.as_auto_editor' => '1', 'edit-alias.edit_note' => '', 'edit-alias.period.end_date.month' => '', 'edit-alias.type_id' => '1', 'edit-alias.sort_name' => 'Wel City Tokyo', 'edit-alias.locale' => 'en', 'edit-alias.name' => 'Wel City Tokyo', 'edit-alias.primary_for_locale' => '1', 'edit-alias.period.begin_date.day' => '' }

      };

      Host: pino

      Oberflächensprache: de

      URL: https://beta.musicbrainz.org/place/c20359e1-0637-4957-8633-509496de89d9/add-alias

            acid2 Oliver Charles
            nikki nikki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2013-10-28