-
Bug
-
Resolution: Fixed
-
Normal
-
Bug fixes, 2011-09-19
-
None
I was trying to edit a label-URL relationship by substituting the label with another one which ALREADY had that URL attached, when I hit another ISE:
Error: Caught exception in MusicBrainz::Server::Controller::Edit::Relationship->edit "The edit could not be created. POST: $VAR1 = { 'returnto' => 'http://musicbrainz.org/label/8900d437-6cc7-4b4c-bdd3-e83634c128df/relationships', 'type1' => 'url', 'ar.link_type_id' => '215', 'ar.end_date.month' => '', 'ar.edit_note' => '', 'ar.begin_date.year' => '', 'type0' => 'label', 'ar.as_auto_editor' => '1', 'ar.entity0.id' => '44978', 'ar.begin_date.month' => '', 'ar.end_date.day' => '', 'ar.end_date.year' => '', 'ar.begin_date.day' => '', 'ar.entity0.name' => 'Lizard Records', 'id' => '28379' }; Exception:$VAR1 = 'Failed query: \'INSERT INTO edit_note (editor,text,edit) VALUES (?,?,?)\' (4 This relationship already exists 15267018) DBD::Pg::st execute failed: ERROR: insert or update on table "edit_note" violates foreign key constraint "edit_note_fk_edit" DETAIL: Key (edit)=(15267018) is not present in table "edit". 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(0xf62ebd8)\', \'Try::Tiny::Catch=REF(0xf64a1c8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 110 Sql::do(\'Sql=HASH(0xb30f9a0)\', \'INSERT INTO edit_note (editor,text,edit) VALUES (?,?,?)\', 4, \'This relationship already exists\', 15267018) called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 149 Sql::insert_row(\'Sql=HASH(0xb30f9a0)\', \'edit_note\', \'HASH(0x9d16270)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/EditNote.pm line 69 MusicBrainz::Server::Data::EditNote::insert(\'MusicBrainz::Server::Data::EditNote=HASH(0xf62f478)\', 15267018, \'HASH(0xf62f1a8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/EditNote.pm line 75 MusicBrainz::Server::Data::EditNote::add_note(\'MusicBrainz::Server::Data::EditNote=HASH(0xf62f478)\', 15267018, \'HASH(0xf62f1a8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Edit.pm line 513 MusicBrainz::Server::Data::Edit::_do_accept(\'MusicBrainz::Server::Data::Edit=HASH(0x96359d0)\', \'MusicBrainz::Server::Edit::Relationship::Edit=HASH(0xf595a40)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Edit.pm line 395 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(0xf6051f8)\', \'Try::Tiny::Catch=REF(0xf601918)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 277 Sql::_auto_transaction(\'CODE(0xf56a3a0)\', \'Sql=HASH(0xb30f9a0)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 282 Sql::_run_in_transaction_one(\'CODE(0xf56a3a0)\', \'Sql=HASH(0xb30f9a0)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 296 Sql::run_in_transaction(\'CODE(0xf56a3a0)\', \'Sql=HASH(0xb30f9a0)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Edit.pm line 429 MusicBrainz::Server::Data::Edit::create(\'MusicBrainz::Server::Data::Edit=HASH(0x96359d0)\', \'editor_id\', 127391, \'privileges\', 1, \'type1\', \'url\', \'relationship\', \'MusicBrainz::Server::Entity::Relationship=HASH(0xcd3bbe8)\', ...) called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Controller.pm line 83 eval {...} called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Controller.pm line 82 MusicBrainz::Server::Controller::_insert_edit(\'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0xac...\', \'MusicBrainz::Server=HASH(0xc43ad98)\', \'MusicBrainz::Server::Form::Relationship=HASH(0xcce7b40)\', \'edit_type\', 91, \'type0\', \'label\', \'type1\', \'url\', ...) called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Controller/Edit/Relationship.pm line 157 MusicBrainz::Server::Controller::Edit::Relationship::edit(\'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0xac...\', \'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 65 Catalyst::Action::execute(\'Catalyst::Action=HASH(0xb1253c8)\', \'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0xac...\', \'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1668 eval {...} called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1668 Catalyst::execute(\'MusicBrainz::Server=HASH(0xc43ad98)\', \'MusicBrainz::Server::Controller::Edit::Relationship\', \'Catalyst::Action=HASH(0xb1253c8)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/StackTrace.pm line 94 Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0xc43ad98)\', \'MusicBrainz::Server::Controller::Edit::Relationship\', \'Catalyst::Action=HASH(0xb1253c8)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 60 Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0xb1253c8)\', \'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/share/perl/5.10.1/Catalyst/Controller.pm line 125 Catalyst::Controller::_ACTION(\'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0xac...\', \'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 65 Catalyst::Action::execute(\'Catalyst::Action=HASH(0xb124d98)\', \'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0xac...\', \'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1668 eval {...} called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1668 Catalyst::execute(\'MusicBrainz::Server=HASH(0xc43ad98)\', \'MusicBrainz::Server::Controller::Edit::Relationship\', \'Catalyst::Action=HASH(0xb124d98)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/StackTrace.pm line 94 Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0xc43ad98)\', \'MusicBrainz::Server::Controller::Edit::Relationship\', \'Catalyst::Action=HASH(0xb124d98)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 60 Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0xb124d98)\', \'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 257 Catalyst::Dispatcher::_do_forward(\'Catalyst::Dispatcher=HASH(0x2bf85a8)\', \'forward\', \'MusicBrainz::Server=HASH(0xc43ad98)\', \'_ACTION\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 237 Catalyst::Dispatcher::forward(\'Catalyst::Dispatcher=HASH(0x2bf85a8)\', \'MusicBrainz::Server=HASH(0xc43ad98)\', \'_ACTION\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 377 Catalyst::forward(\'MusicBrainz::Server=HASH(0xc43ad98)\', \'_ACTION\') called at /usr/local/share/perl/5.10.1/Catalyst/Controller.pm line 99 Catalyst::Controller::_DISPATCH(\'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0xac...\', \'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 65 Catalyst::Action::execute(\'Catalyst::Action=HASH(0xb11f130)\', \'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0xac...\', \'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1668 eval {...} called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1668 Catalyst::execute(\'MusicBrainz::Server=HASH(0xc43ad98)\', \'MusicBrainz::Server::Controller::Edit::Relationship\', \'Catalyst::Action=HASH(0xb11f130)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/StackTrace.pm line 94 Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0xc43ad98)\', \'MusicBrainz::Server::Controller::Edit::Relationship\', \'Catalyst::Action=HASH(0xb11f130)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 60 Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0xb11f130)\', \'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 257 Catalyst::Dispatcher::_do_forward(\'Catalyst::Dispatcher=HASH(0x2bf85a8)\', \'forward\', \'MusicBrainz::Server=HASH(0xc43ad98)\', \'/edit/relationship/_DISPATCH\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 237 Catalyst::Dispatcher::forward(\'Catalyst::Dispatcher=HASH(0x2bf85a8)\', \'MusicBrainz::Server=HASH(0xc43ad98)\', \'/edit/relationship/_DISPATCH\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 377 Catalyst::forward(\'MusicBrainz::Server=HASH(0xc43ad98)\', \'/edit/relationship/_DISPATCH\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 105 Catalyst::Dispatcher::dispatch(\'Catalyst::Dispatcher=HASH(0x2bf85a8)\', \'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1614 Catalyst::dispatch(\'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/Static/Simple.pm line 76 Class::MOP::Class:::around(\'CODE(0x25241e8)\', \'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 162 Class::MOP::Method::Wrapped::__ANON__(\'MusicBrainz::Server=HASH(0xc43ad98)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server.pm line 270 Class::MOP::Class:::around(\'CODE(0x7f0c3d8b95f8)\', \'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 162 Class::MOP::Method::Wrapped::__ANON__(\'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 91 MusicBrainz::Server::dispatch(\'MusicBrainz::Server=HASH(0xc43ad98)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1955 eval {...} called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1946 Catalyst::handle_request(\'MusicBrainz::Server\', \'env\', \'HASH(0x32a1bd8)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/AutoRestart.pm line 119 Catalyst::Plugin::AutoRestart::handle_request(\'MusicBrainz::Server\', \'env\', \'HASH(0x32a1bd8)\') called at /usr/local/share/perl/5.10.1/Catalyst/Engine/FastCGI.pm line 149 Catalyst::Engine::FastCGI::run(\'Catalyst::Engine::FastCGI=HASH(0x325ce08)\', \'MusicBrainz::Server\', \'127.0.0.1:55901\', \'HASH(0xa6cd48)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 2399 Catalyst::run(\'MusicBrainz::Server\', \'127.0.0.1:55901\', \'HASH(0xa6cd48)\') called at ./script/musicbrainz_fastcgi.pl line 28 at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 277 '; at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 65" Stack trace: line 94 MusicBrainz::Server::Controller line 157 MusicBrainz::Server::Controller::Edit::Relationship line 270 MusicBrainz::Server Request data: $VAR1 = { 'query_parameters' => { 'type1' => 'url', 'returnto' => 'http://musicbrainz.org/label/8900d437-6cc7-4b4c-bdd3-e83634c128df/relationships', 'type0' => 'label', 'id' => '28379' }, 'body_parameters' => { 'ar.edit_note' => '', 'ar.end_date.month' => '', 'ar.link_type_id' => '215', 'ar.begin_date.year' => '', 'ar.as_auto_editor' => '1', 'ar.entity0.id' => '44978', 'ar.end_date.day' => '', 'ar.begin_date.month' => '', 'ar.entity0.name' => 'Lizard Records', 'ar.begin_date.day' => '', 'ar.end_date.year' => '' } }; URL: http://musicbrainz.org/edit/relationship/edit?returnto=http%3A%2F%2Fmusicbrainz.org%2Flabel%2F8900d437-6cc7-4b4c-bdd3-e83634c128df%2Frelationships&type1=url&type0=label&id=28379