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

CAA : ISE if you try to add a 2nd front cover art

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • Cover Art Archive
    • Cover Art Archive
    • None
    • None

      If the release already has a front cover art, adding a second one fails:
      (same issue probably exists with back cover arts)

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

      Unknown macro: { 'add-cover-art.id' => '290968060', 'add-cover-art.filename' => 'mbid-b705dcee-a011-4bf0-abf2-4c4d9d586e9e-290968060.jpg', 'add-cover-art.type_id' => '2', 'add-cover-art.position' => '5', 'add-cover-art.comment' => '', 'add-cover-art.edit_note' => '2nd front' }

      ;

      Exception:$VAR1 = 'Failed query:
      \'INSERT INTO cover_art_archive.cover_art (release, edit, ordering, id, is_front, is_back, comment)
      VALUES (?, ?, ?, ?, ?, ?, ?)\'
      (720552 16086254 5 290968060 1 0 )
      DBD::Pg::st execute failed: ERROR: duplicate key value violates unique constraint "cover_art_unique_front_constraint"
      DETAIL: Key (release, is_front)=(720552, t) already exists. at lib/Sql.pm line 103.

      at lib/Sql.pm line 109
      Sql::_ANON_(\'DBD::Pg::st execute failed: ERROR: duplicate key value viola...\') called at /home/musicbrainz/perl5/lib/perl5/Try/Tiny.pm line 100
      Try::Tiny::try(\'CODE(0x1050e2f0)\', \'Try::Tiny::Catch=REF(0x104900a0)\') called at lib/Sql.pm line 110
      Sql::do(\'Sql=HASH(0xd903e00)\', \'INSERT INTO cover_art_archive.cover_art (release, edit, order...\', 720552, 16086254, 5, 290968060, 1, 0, \'\', ...) called at lib/MusicBrainz/Server/Data/CoverArtArchive.pm line 213
      MusicBrainz::Server::Data::CoverArtArchive::insert_cover_art(\'MusicBrainz::Server::Data::CoverArtArchive=HASH(0x9f51db0)\', 720552, 16086254, 290968060, 5, \'ARRAY(0x1050da08)\', \'\') called at lib/MusicBrainz/Server/Edit/Release/AddCoverArt.pm line 93
      MusicBrainz::Server::Edit::Release::AddCoverArt::insert(\'MusicBrainz::Server::Edit::Release::AddCoverArt=HASH(0x10524040)\') called at lib/MusicBrainz/Server/Data/Edit.pm line 405
      MusicBrainz::Server::Data::Edit::_ANON_() called at lib/Sql.pm line 264
      Sql::_ANON_() called at /home/musicbrainz/perl5/lib/perl5/Try/Tiny.pm line 76
      eval

      Unknown macro: {...}

      called at /home/musicbrainz/perl5/lib/perl5/Try/Tiny.pm line 67
      Try::Tiny::try(\'CODE(0x104ee028)\', \'Try::Tiny::Catch=REF(0x1047a578)\') called at lib/Sql.pm line 277
      Sql::_auto_transaction(\'CODE(0x10524028)\', \'Sql=HASH(0xd903e00)\') called at lib/Sql.pm line 282
      Sql::_run_in_transaction_one(\'CODE(0x10524028)\', \'Sql=HASH(0xd903e00)\') called at lib/Sql.pm line 296
      Sql::run_in_transaction(\'CODE(0x10524028)\', \'Sql=HASH(0xd903e00)\') called at lib/MusicBrainz/Server/Data/Edit.pm line 426
      MusicBrainz::Server::Data::Edit::create(\'MusicBrainz::Server::Data::Edit=HASH(0xaf3ceb8)\', \'editor_id\', 29366, \'privileges\', 0, \'cover_art_types\', \'ARRAY(0x1050da08)\', \'cover_art_id\', 290968060, ...) called at lib/MusicBrainz/Server/Controller.pm line 83
      MusicBrainz::Server::Controller::_ANON_() called at /home/musicbrainz/perl5/lib/perl5/Try/Tiny.pm line 76
      eval

      called at /home/musicbrainz/perl5/lib/perl5/Try/Tiny.pm line 67
      Try::Tiny::try(\'CODE(0xdd7cb90)\', \'Try::Tiny::Catch=REF(0x104fc8b0)\') called at lib/MusicBrainz/Server/Controller.pm line 99
      MusicBrainz::Server::Controller::_insert_edit(\'MusicBrainz::Server::Controller::Release=HASH(0xc462458)\', \'MusicBrainz::Server=HASH(0xca4db60)\', \'MusicBrainz::Server::Form::Release::AddCoverArt=HASH(0xe1fce70)\', \'edit_type\', 314, \'release\', \'MusicBrainz::Server::Entity::Release=HASH(0xe3b42b0)\', \'cover_art_url\', \'mbid-b705dcee-a011-4bf0-abf2-4c4d9d586e9e-290968060.jpg\', ...) called at lib/MusicBrainz/Server/Controller/Release.pm line 424
      MusicBrainz::Server::Controller::Release::add_cover_art(\'MusicBrainz::Server::Controller::Release=HASH(0xc462458)\', \'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute(\'Catalyst::Action=HASH(0xc803598)\', \'MusicBrainz::Server::Controller::Release=HASH(0xc462458)\', \'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst.pm line 1667
      eval

      Unknown macro: {...}

      called at /home/musicbrainz/perl5/lib/perl5/Catalyst.pm line 1667
      Catalyst::execute(\'MusicBrainz::Server=HASH(0xca4db60)\', \'MusicBrainz::Server::Controller::Release\', \'Catalyst::Action=HASH(0xc803598)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0xca4db60)\', \'MusicBrainz::Server::Controller::Release\', \'Catalyst::Action=HASH(0xc803598)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0xc803598)\', \'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/ActionChain.pm line 38
      Catalyst::ActionChain::dispatch(\'Catalyst::ActionChain=HASH(0xdd7cd58)\', \'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Controller.pm line 125
      Catalyst::Controller::_ACTION(\'MusicBrainz::Server::Controller::Release=HASH(0xc462458)\', \'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute(\'Catalyst::Action=HASH(0xc7fc650)\', \'MusicBrainz::Server::Controller::Release=HASH(0xc462458)\', \'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst.pm line 1667
      eval

      called at /home/musicbrainz/perl5/lib/perl5/Catalyst.pm line 1667
      Catalyst::execute(\'MusicBrainz::Server=HASH(0xca4db60)\', \'MusicBrainz::Server::Controller::Release\', \'Catalyst::Action=HASH(0xc7fc650)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0xca4db60)\', \'MusicBrainz::Server::Controller::Release\', \'Catalyst::Action=HASH(0xc7fc650)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0xc7fc650)\', \'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward(\'Catalyst::Dispatcher=HASH(0x38be4a0)\', \'forward\', \'MusicBrainz::Server=HASH(0xca4db60)\', \'_ACTION\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Dispatcher.pm line 237
      Catalyst::Dispatcher::forward(\'Catalyst::Dispatcher=HASH(0x38be4a0)\', \'MusicBrainz::Server=HASH(0xca4db60)\', \'_ACTION\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst.pm line 342
      Catalyst::forward(\'MusicBrainz::Server=HASH(0xca4db60)\', \'_ACTION\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Controller.pm line 99
      Catalyst::Controller::_DISPATCH(\'MusicBrainz::Server::Controller::Release=HASH(0xc462458)\', \'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute(\'Catalyst::Action=HASH(0xc7fbfa8)\', \'MusicBrainz::Server::Controller::Release=HASH(0xc462458)\', \'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst.pm line 1667
      eval

      Unknown macro: {...}

      called at /home/musicbrainz/perl5/lib/perl5/Catalyst.pm line 1667
      Catalyst::execute(\'MusicBrainz::Server=HASH(0xca4db60)\', \'MusicBrainz::Server::Controller::Release\', \'Catalyst::Action=HASH(0xc7fbfa8)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0xca4db60)\', \'MusicBrainz::Server::Controller::Release\', \'Catalyst::Action=HASH(0xc7fbfa8)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0xc7fbfa8)\', \'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward(\'Catalyst::Dispatcher=HASH(0x38be4a0)\', \'forward\', \'MusicBrainz::Server=HASH(0xca4db60)\', \'/release/_DISPATCH\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Dispatcher.pm line 237
      Catalyst::Dispatcher::forward(\'Catalyst::Dispatcher=HASH(0x38be4a0)\', \'MusicBrainz::Server=HASH(0xca4db60)\', \'/release/_DISPATCH\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst.pm line 342
      Catalyst::forward(\'MusicBrainz::Server=HASH(0xca4db60)\', \'/release/_DISPATCH\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Dispatcher.pm line 105
      Catalyst::Dispatcher::dispatch(\'Catalyst::Dispatcher=HASH(0x38be4a0)\', \'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst.pm line 1613
      Catalyst::dispatch(\'MusicBrainz::Server=HASH(0xca4db60)\') called at lib/MusicBrainz/Server.pm line 264
      Class::MOP::Class:::around(\'CODE(0x3492178)\', \'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 162
      Class::MOP::Method::Wrapped::_ANON_(\'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 91
      MusicBrainz::Server::dispatch(\'MusicBrainz::Server=HASH(0xca4db60)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst.pm line 1963
      Catalyst::_ANON_() called at /home/musicbrainz/perl5/lib/perl5/Try/Tiny.pm line 76
      eval

      called at /home/musicbrainz/perl5/lib/perl5/Try/Tiny.pm line 67
      Try::Tiny::try(\'CODE(0xca4db00)\', \'Try::Tiny::Catch=REF(0xe10e0a8)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst.pm line 1969
      Catalyst::handle_request(\'MusicBrainz::Server\', \'env\', \'HASH(0xc9f0408)\') called at /home/musicbrainz/perl5/lib/perl5/Catalyst/Engine.pm line 856
      Catalyst::Engine::_ANON_(\'CODE(0xd8f7ba0)\') called at /home/musicbrainz/perl5/lib/perl5/Plack/Handler/FCGI.pm line 134
      Plack::Handler::FCGI::run(\'Plack::Handler::FCGI=HASH(0x18e9928)\', \'CODE(0xc9cf020)\') called at /home/musicbrainz/perl5/lib/perl5/Plack/Loader.pm line 88
      Plack::Loader::run(\'Plack::Loader=HASH(0x18bee28)\', \'Plack::Handler::FCGI=HASH(0x18e9928)\') called at /home/musicbrainz/perl5/lib/perl5/Plack/Runner.pm line 263
      Plack::Runner::run(\'Plack::Runner=HASH(0x16b4a78)\') called at /home/musicbrainz/perl5/bin/plackup line 10
      at lib/Sql.pm line 277
      ';
      at lib/MusicBrainz/Server/Controller.pm line 99"

      Stack trace:

      line 95 MusicBrainz::Server::Controller
      line 99 MusicBrainz::Server::Controller
      line 424 MusicBrainz::Server::Controller::Release
      line 264 MusicBrainz::Server

      Request data:

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

      Unknown macro: { 'add-cover-art.id' => '290968060', 'add-cover-art.type_id' => '2', 'add-cover-art.filename' => 'mbid-b705dcee-a011-4bf0-abf2-4c4d9d586e9e-290968060.jpg', 'add-cover-art.edit_note' => '2nd front', 'add-cover-art.comment' => '', 'add-cover-art.position' => '5' }

      };

      URL: http://test.musicbrainz.org/release/b705dcee-a011-4bf0-abf2-4c4d9d586e9e/add-cover-art

            acid2 Oliver Charles
            murdos Aurélien Mino
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                Cover Art Archive