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

Error (foreign key constraint violation) when editing URL

XMLWordPrintable

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

      { 'edit-url.as_auto_editor' => '1', 'edit-url.description' => '', 'edit-url.url' => 'http://www.discogs.com/label/4+Lux', 'edit-url.edit_note' => '' }

      ;

      Exception:$VAR1 = 'Failed query:
      \'
      UPDATE l_label_url SET entity1 = ?
      WHERE entity1 IN (?,?)
      \'
      (415460 415460 902835)
      DBD::Pg::st execute failed: ERROR: insert or update on table "l_label_url" violates foreign key constraint "l_label_url_fk_entity1"
      DETAIL: Key (entity1)=(415460) is not present in table "url". at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 103.

      at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 109
      Sql::_ANON_(\'DBD::Pg::st execute failed: ERROR: insert or update on table...\') called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 100
      Try::Tiny::try(\'CODE(0xd98ffc8)\', \'Try::Tiny::Catch=REF(0xd9b7f68)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 110
      Sql::do(\'Sql=HASH(0x9f323e8)\', \'
      x

      {a} UPDATE l_label_url SET entity1 = ?
      x{a}

      W...\', 415460, 415460, 902835) called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Relationship.pm line 310
      MusicBrainz::Server::Data::Relationship::merge_entities(\'MusicBrainz::Server::Data::Relationship=HASH(0xd98ff80)\', \'url\', 415460, 902835) called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/URL.pm line 91
      MusicBrainz::Server::Data::URL::_merge_impl(\'MusicBrainz::Server::Data::URL=HASH(0xa321918)\', 415460, 902835) called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Role/Merge.pm line 30
      Class::MOP::Class:::around(\'CODE(0x662e4d8)\', \'MusicBrainz::Server::Data::URL=HASH(0xa321918)\', 415460, 902835) called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 159
      Class::MOP::Method::Wrapped::_ANON_(\'MusicBrainz::Server::Data::URL=HASH(0xa321918)\', 415460, 902835) called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 89
      MusicBrainz::Server::Data::URL::merge(\'MusicBrainz::Server::Data::URL=HASH(0xa321918)\', 415460, 902835) called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/URL.pm line 104
      MusicBrainz::Server::Data::URL::update(\'MusicBrainz::Server::Data::URL=HASH(0xa321918)\', 902835, \'HASH(0xd98fcc8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Edit/URL/Edit.pm line 85
      Class::MOP::Class:::around(\'CODE(0xbf73140)\', \'MusicBrainz::Server::Edit::URL::Edit=HASH(0xd98fcf8)\') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 159
      Class::MOP::Method::Wrapped::_ANON_(\'MusicBrainz::Server::Edit::URL::Edit=HASH(0xd98fcf8)\') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 89
      MusicBrainz::Server::Edit::URL::Edit::accept(\'MusicBrainz::Server::Edit::URL::Edit=HASH(0xd98fcf8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Edit.pm line 507
      MusicBrainz::Server::Data::Edit::_ANON_() called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 71
      eval

      {...} called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 67
      Try::Tiny::try(\'CODE(0xd978298)\', \'Try::Tiny::Catch=REF(0xd98ff98)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Edit.pm line 533
      MusicBrainz::Server::Data::Edit::_do_accept(\'MusicBrainz::Server::Data::Edit=HASH(0x82c0bf8)\', \'MusicBrainz::Server::Edit::URL::Edit=HASH(0xd98fcf8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Edit.pm line 572
      MusicBrainz::Server::Data::Edit::_ANON_(\'MusicBrainz::Server::Edit::URL::Edit=HASH(0xd98fcf8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Edit.pm line 599
      MusicBrainz::Server::Data::Edit::_close(\'MusicBrainz::Server::Data::Edit=HASH(0x82c0bf8)\', \'MusicBrainz::Server::Edit::URL::Edit=HASH(0xd98fcf8)\', \'CODE(0xd9a14d0)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Edit.pm line 572
      MusicBrainz::Server::Data::Edit::accept(\'MusicBrainz::Server::Data::Edit=HASH(0x82c0bf8)\', \'MusicBrainz::Server::Edit::URL::Edit=HASH(0xd98fcf8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Edit.pm line 421
      MusicBrainz::Server::Data::Edit::_ANON_() called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 264
      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(0xd9a10c8)\', \'Try::Tiny::Catch=REF(0xd961dd8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 277
      Sql::_auto_transaction(\'CODE(0xd8843a8)\', \'Sql=HASH(0x9f323e8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 282
      Sql::_run_in_transaction_one(\'CODE(0xd8843a8)\', \'Sql=HASH(0x9f323e8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 296
      Sql::run_in_transaction(\'CODE(0xd8843a8)\', \'Sql=HASH(0x9f323e8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Edit.pm line 426
      MusicBrainz::Server::Data::Edit::create(\'MusicBrainz::Server::Data::Edit=HASH(0x82c0bf8)\', \'editor_id\', 53705, \'privileges\', 41, \'url\', \'http://www.discogs.com/label/4+Lux\', \'edit_type\', 101, ...) called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Controller.pm line 83
      MusicBrainz::Server::Controller::_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(0xbf5afa0)\', \'Try::Tiny::Catch=REF(0xbe2b6c8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Controller.pm line 99
      MusicBrainz::Server::Controller::_insert_edit(\'MusicBrainz::Server::Controller::URL=HASH(0x9569dc8)\', \'MusicBrainz::Server=HASH(0x9d0c850)\', \'MusicBrainz::Server::Form::URL=HASH(0xbe24bc0)\', \'edit_type\', 101, \'url\', \'http://www.discogs.com/label/4+Lux\', \'description\', undef, ...) called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Controller.pm line 132
      MusicBrainz::Server::Controller::edit_action(\'MusicBrainz::Server::Controller::URL=HASH(0x9569dc8)\', \'MusicBrainz::Server=HASH(0x9d0c850)\', \'form\', \'URL\', \'type\', 101, \'item\', \'MusicBrainz::Server::Entity::URL::Discogs=HASH(0xbe26130)\', \'edit_args\', ...) called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Controller/Role/Edit.pm line 37
      Moose::Meta::Role::_ANON_::SERIAL::3::edit(\'MusicBrainz::Server::Controller::URL=HASH(0x9569dc8)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 65
      Catalyst::Action::execute(\'Catalyst::Action=HASH(0x9836318)\', \'MusicBrainz::Server::Controller::URL=HASH(0x9569dc8)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1665
      eval {...}

      called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1665
      Catalyst::execute(\'MusicBrainz::Server=HASH(0x9d0c850)\', \'MusicBrainz::Server::Controller::URL\', \'Catalyst::Action=HASH(0x9836318)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0x9d0c850)\', \'MusicBrainz::Server::Controller::URL\', \'Catalyst::Action=HASH(0x9836318)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0x9836318)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst/ActionChain.pm line 39
      Catalyst::ActionChain::dispatch(\'Catalyst::ActionChain=HASH(0xc011f68)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst/Controller.pm line 110
      Catalyst::Controller::_ACTION(\'MusicBrainz::Server::Controller::URL=HASH(0x9569dc8)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 65
      Catalyst::Action::execute(\'Catalyst::Action=HASH(0x9836630)\', \'MusicBrainz::Server::Controller::URL=HASH(0x9569dc8)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1665
      eval

      {...} called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1665
      Catalyst::execute(\'MusicBrainz::Server=HASH(0x9d0c850)\', \'MusicBrainz::Server::Controller::URL\', \'Catalyst::Action=HASH(0x9836630)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0x9d0c850)\', \'MusicBrainz::Server::Controller::URL\', \'Catalyst::Action=HASH(0x9836630)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0x9836630)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward(\'Catalyst::Dispatcher=HASH(0x20e8a20)\', \'forward\', \'MusicBrainz::Server=HASH(0x9d0c850)\', \'_ACTION\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 237
      Catalyst::Dispatcher::forward(\'Catalyst::Dispatcher=HASH(0x20e8a20)\', \'MusicBrainz::Server=HASH(0x9d0c850)\', \'_ACTION\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 377
      Catalyst::forward(\'MusicBrainz::Server=HASH(0x9d0c850)\', \'_ACTION\') called at /usr/local/share/perl/5.10.1/Catalyst/Controller.pm line 84
      Catalyst::Controller::_DISPATCH(\'MusicBrainz::Server::Controller::URL=HASH(0x9569dc8)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 65
      Catalyst::Action::execute(\'Catalyst::Action=HASH(0x982b098)\', \'MusicBrainz::Server::Controller::URL=HASH(0x9569dc8)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1665
      eval {...}

      called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1665
      Catalyst::execute(\'MusicBrainz::Server=HASH(0x9d0c850)\', \'MusicBrainz::Server::Controller::URL\', \'Catalyst::Action=HASH(0x982b098)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0x9d0c850)\', \'MusicBrainz::Server::Controller::URL\', \'Catalyst::Action=HASH(0x982b098)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0x982b098)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward(\'Catalyst::Dispatcher=HASH(0x20e8a20)\', \'forward\', \'MusicBrainz::Server=HASH(0x9d0c850)\', \'/url/_DISPATCH\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 237
      Catalyst::Dispatcher::forward(\'Catalyst::Dispatcher=HASH(0x20e8a20)\', \'MusicBrainz::Server=HASH(0x9d0c850)\', \'/url/_DISPATCH\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 377
      Catalyst::forward(\'MusicBrainz::Server=HASH(0x9d0c850)\', \'/url/_DISPATCH\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 105
      Catalyst::Dispatcher::dispatch(\'Catalyst::Dispatcher=HASH(0x20e8a20)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1611
      Catalyst::dispatch(\'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/Static/Simple.pm line 76
      Class::MOP::Class:::around(\'CODE(0x27436d0)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 159
      Class::MOP::Method::Wrapped::_ANON_(\'MusicBrainz::Server=HASH(0x9d0c850)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server.pm line 273
      Class::MOP::Class:::around(\'CODE(0x9b9e098)\', \'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 159
      Class::MOP::Method::Wrapped::_ANON_(\'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 89
      MusicBrainz::Server::dispatch(\'MusicBrainz::Server=HASH(0x9d0c850)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1952
      eval

      {...}

      called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1943
      Catalyst::handle_request(\'MusicBrainz::Server\', \'env\', \'HASH(0x34a75a0)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Catalyst/Plugin/AutoRestart.pm line 119
      Catalyst::Plugin::AutoRestart::handle_request(\'MusicBrainz::Server\', \'env\', \'HASH(0x34a75a0)\') called at /usr/local/share/perl/5.10.1/Catalyst/Engine/FastCGI.pm line 149
      Catalyst::Engine::FastCGI::run(\'Catalyst::Engine::FastCGI=HASH(0x3474770)\', \'MusicBrainz::Server\', \'127.0.0.1:55901\', \'HASH(0xfd6d48)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 2396
      Catalyst::run(\'MusicBrainz::Server\', \'127.0.0.1:55901\', \'HASH(0xfd6d48)\') called at ./script/musicbrainz_fastcgi.pl line 37
      at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 277
      ';
      at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Controller.pm line 99"

      Stack trace:
      line 95 MusicBrainz::Server::Controller
      line 99 MusicBrainz::Server::Controller
      line 132 MusicBrainz::Server::Controller
      line 37 MusicBrainz::Server::Controller::Role::Edit
      line 273 MusicBrainz::Server

      Request data:
      $VAR1 = {
      'query_parameters' => {},
      'body_parameters' =>

      { 'edit-url.as_auto_editor' => '1', 'edit-url.description' => '', 'edit-url.url' => 'http://www.discogs.com/label/4+Lux', 'edit-url.edit_note' => '' }

      };

      URL: http://musicbrainz.org/url/f0cf00b6-0413-4669-aaef-1d65e224bd86/edit

            Unassigned Unassigned
            nikki nikki
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                Bug fixes, 2011-12-22