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

Internal server error when adding an entity with double spaces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • Bug fixes, 2012-09-03
    • None
    • None
    • None

      When adding an entity with double spaces from
      http://musicbrainz.org/artist/create
      http://musicbrainz.org/label/create
      http://musicbrainz.org/recording/create or
      http://musicbrainz.org/work/create
      (releases and release groups are fine):

      Caught exception in MusicBrainz::Server::Controller::Artist->create "The edit could not be created.
      POST: $VAR1 = {
                'edit-artist.begin_date.month' => '',
                'edit-artist.edit_note' => '',
                'edit-artist.as_auto_editor' => '1',
                'edit-artist.end_date.day' => '',
                'edit-artist.begin_date.year' => '',
                'edit-artist.end_date.year' => '',
                'edit-artist.country_id' => '',
                'edit-artist.begin_date.day' => '',
                'edit-artist.gender_id' => '',
                'edit-artist.not_dupe' => '1',
                'edit-artist.ipi_codes.0' => '',
                'edit-artist.type_id' => '',
                'edit-artist.sort_name' => 'test  test',
                'edit-artist.comment' => 'test  test',
                'edit-artist.name' => 'test  test',
                'edit-artist.end_date.month' => ''
              };
      
      Exception:$VAR1 = 'DBD::Pg::st execute failed: ERROR:  new row for relation "artist" violates check constraint "artist_comment_check" at lib/Sql.pm line 414.
       at lib/Sql.pm line 429
      	Sql::__ANON__(\'DBD::Pg::st execute failed: ERROR:  new row for relation "art...\') called at local/lib/perl5/Try/Tiny.pm line 100
      	Try::Tiny::try(\'CODE(0x1011a868)\', \'Try::Tiny::Catch=REF(0xe7e1020)\') called at lib/Sql.pm line 430
      	Sql::_select_list(\'Sql=HASH(0xe7b9120)\', \'INSERT INTO artist (country,begin_date_day,name,begin_date_ye...\', \'ARRAY(0xddcb728)\', \'arrayref\', \'CODE(0x5145518)\') called at lib/Sql.pm line 449
      	Sql::select_list_of_lists(\'Sql=HASH(0xe7b9120)\', \'INSERT INTO artist (country,begin_date_day,name,begin_date_ye...\', undef, undef, 1271720, undef, 0, undef, \'test  test\', ...) called at lib/Sql.pm line 382
      	Sql::select_single_column_array(\'Sql=HASH(0xe7b9120)\', \'INSERT INTO artist (country,begin_date_day,name,begin_date_ye...\', undef, undef, 1271720, undef, 0, undef, \'test  test\', ...) called at lib/Sql.pm line 397
      	Sql::select_single_value(\'Sql=HASH(0xe7b9120)\', \'INSERT INTO artist (country,begin_date_day,name,begin_date_ye...\', undef, undef, 1271720, undef, 0, undef, \'test  test\', ...) called at lib/Sql.pm line 150
      	Sql::insert_row(\'Sql=HASH(0xe7b9120)\', \'artist\', \'HASH(0x5202288)\', \'id\') called at lib/MusicBrainz/Server/Data/Artist.pm line 206
      	MusicBrainz::Server::Data::Artist::insert(\'MusicBrainz::Server::Data::Artist=HASH(0xa71fa88)\', \'HASH(0x10da7268)\') called at lib/MusicBrainz/Server/Edit/Generic/Create.pm line 45
      	MusicBrainz::Server::Edit::Generic::Create::insert(\'MusicBrainz::Server::Edit::Artist::Create=HASH(0x10d345f0)\') called at local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 56
      	Class::MOP::Method::Wrapped::__ANON__(\'MusicBrainz::Server::Edit::Artist::Create=HASH(0x10d345f0)\') called at local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 91
      	MusicBrainz::Server::Edit::Artist::Create::insert(\'MusicBrainz::Server::Edit::Artist::Create=HASH(0x10d345f0)\') called at lib/MusicBrainz/Server/Data/Edit.pm line 391
      	MusicBrainz::Server::Data::Edit::create(\'MusicBrainz::Server::Data::Edit=HASH(0xac8a998)\', \'editor_id\', 53705, \'privileges\', 185, \'name\', \'test test\', \'begin_date\', \'HASH(0xe7b8528)\', ...) called at lib/MusicBrainz/Server/Controller.pm line 85
      	MusicBrainz::Server::Controller::__ANON__() called at local/lib/perl5/Try/Tiny.pm line 76
      	eval {...} called at local/lib/perl5/Try/Tiny.pm line 67
      	Try::Tiny::try(\'CODE(0xe76ebe8)\', \'Try::Tiny::Catch=REF(0xe76f5c0)\') called at lib/MusicBrainz/Server/Controller.pm line 101
      	MusicBrainz::Server::Controller::_insert_edit(\'MusicBrainz::Server::Controller::Artist=HASH(0xbd5ddd0)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'MusicBrainz::Server::Form::Artist=HASH(0xdd6ccf0)\', \'edit_type\', 1, \'name\', \'test test\', \'sort_name\', \'test test\', ...) called at lib/MusicBrainz/Server/Controller.pm line 136
      	MusicBrainz::Server::Controller::__ANON__() called at lib/Sql.pm line 281
      	Sql::__ANON__() called at local/lib/perl5/Try/Tiny.pm line 76
      	eval {...} called at local/lib/perl5/Try/Tiny.pm line 67
      	Try::Tiny::try(\'CODE(0xe775990)\', \'Try::Tiny::Catch=REF(0xe76ed38)\') called at lib/Sql.pm line 294
      	Sql::_auto_transaction(\'CODE(0xe752fc0)\', \'Sql=HASH(0xe7b9120)\') called at lib/Sql.pm line 299
      	Sql::_run_in_transaction_one(\'CODE(0xe752fc0)\', \'Sql=HASH(0xe7b9120)\') called at lib/Sql.pm line 313
      	Sql::run_in_transaction(\'CODE(0xe752fc0)\', \'Sql=HASH(0xe7b9120)\') called at lib/MusicBrainz/Server/Model/MB.pm line 17
      	MusicBrainz::Server::Model::MB::with_transaction(\'MusicBrainz::Server::Model::MB=HASH(0xa62f780)\', \'CODE(0xe752fc0)\') called at lib/MusicBrainz/Server/Controller.pm line 144
      	MusicBrainz::Server::Controller::edit_action(\'MusicBrainz::Server::Controller::Artist=HASH(0xbd5ddd0)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'form\', \'Artist\', \'type\', 1, \'on_creation\', \'CODE(0xdd714e8)\') called at lib/MusicBrainz/Server/Controller/Role/Create.pm line 56
      	Moose::Meta::Role::__ANON__::SERIAL::85::create(\'MusicBrainz::Server::Controller::Artist=HASH(0xbd5ddd0)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/Catalyst/Action.pm line 65
      	Catalyst::Action::execute(\'Catalyst::Action=HASH(0xc1aa7b0)\', \'MusicBrainz::Server::Controller::Artist=HASH(0xbd5ddd0)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/Catalyst.pm line 1667
      	eval {...} called at local/lib/perl5/Catalyst.pm line 1667
      	Catalyst::execute(\'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'MusicBrainz::Server::Controller::Artist\', \'Catalyst::Action=HASH(0xc1aa7b0)\') called at local/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
      	Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'MusicBrainz::Server::Controller::Artist\', \'Catalyst::Action=HASH(0xc1aa7b0)\') called at lib/MusicBrainz/Server.pm line 322
      	MusicBrainz::Server::execute(\'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'MusicBrainz::Server::Controller::Artist\', \'Catalyst::Action=HASH(0xc1aa7b0)\') called at local/lib/perl5/Catalyst/Action.pm line 60
      	Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0xc1aa7b0)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/Catalyst/Controller.pm line 125
      	Catalyst::Controller::_ACTION(\'MusicBrainz::Server::Controller::Artist=HASH(0xbd5ddd0)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/Catalyst/Action.pm line 65
      	Catalyst::Action::execute(\'Catalyst::Action=HASH(0xc190a98)\', \'MusicBrainz::Server::Controller::Artist=HASH(0xbd5ddd0)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/Catalyst.pm line 1667
      	eval {...} called at local/lib/perl5/Catalyst.pm line 1667
      	Catalyst::execute(\'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'MusicBrainz::Server::Controller::Artist\', \'Catalyst::Action=HASH(0xc190a98)\') called at local/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
      	Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'MusicBrainz::Server::Controller::Artist\', \'Catalyst::Action=HASH(0xc190a98)\') called at lib/MusicBrainz/Server.pm line 322
      	MusicBrainz::Server::execute(\'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'MusicBrainz::Server::Controller::Artist\', \'Catalyst::Action=HASH(0xc190a98)\') called at local/lib/perl5/Catalyst/Action.pm line 60
      	Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0xc190a98)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/Catalyst/Dispatcher.pm line 257
      	Catalyst::Dispatcher::_do_forward(\'Catalyst::Dispatcher=HASH(0x3884038)\', \'forward\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'_ACTION\') called at local/lib/perl5/Catalyst/Dispatcher.pm line 237
      	Catalyst::Dispatcher::forward(\'Catalyst::Dispatcher=HASH(0x3884038)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'_ACTION\') called at local/lib/perl5/Catalyst.pm line 342
      	Catalyst::forward(\'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'_ACTION\') called at local/lib/perl5/Catalyst/Controller.pm line 99
      	Catalyst::Controller::_DISPATCH(\'MusicBrainz::Server::Controller::Artist=HASH(0xbd5ddd0)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/Catalyst/Action.pm line 65
      	Catalyst::Action::execute(\'Catalyst::Action=HASH(0xc190738)\', \'MusicBrainz::Server::Controller::Artist=HASH(0xbd5ddd0)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/Catalyst.pm line 1667
      	eval {...} called at local/lib/perl5/Catalyst.pm line 1667
      	Catalyst::execute(\'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'MusicBrainz::Server::Controller::Artist\', \'Catalyst::Action=HASH(0xc190738)\') called at local/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
      	Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'MusicBrainz::Server::Controller::Artist\', \'Catalyst::Action=HASH(0xc190738)\') called at lib/MusicBrainz/Server.pm line 322
      	MusicBrainz::Server::execute(\'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'MusicBrainz::Server::Controller::Artist\', \'Catalyst::Action=HASH(0xc190738)\') called at local/lib/perl5/Catalyst/Action.pm line 60
      	Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0xc190738)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/Catalyst/Dispatcher.pm line 257
      	Catalyst::Dispatcher::_do_forward(\'Catalyst::Dispatcher=HASH(0x3884038)\', \'forward\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'/artist/_DISPATCH\') called at local/lib/perl5/Catalyst/Dispatcher.pm line 237
      	Catalyst::Dispatcher::forward(\'Catalyst::Dispatcher=HASH(0x3884038)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'/artist/_DISPATCH\') called at local/lib/perl5/Catalyst.pm line 342
      	Catalyst::forward(\'MusicBrainz::Server=HASH(0xdd7a6e8)\', \'/artist/_DISPATCH\') called at local/lib/perl5/Catalyst/Dispatcher.pm line 105
      	Catalyst::Dispatcher::dispatch(\'Catalyst::Dispatcher=HASH(0x3884038)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/Catalyst.pm line 1613
      	Catalyst::dispatch(\'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at lib/MusicBrainz/Server.pm line 286
      	Class::MOP::Class:::around(\'CODE(0x3185a68)\', \'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 162
      	Class::MOP::Method::Wrapped::__ANON__(\'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 91
      	MusicBrainz::Server::dispatch(\'MusicBrainz::Server=HASH(0xdd7a6e8)\') called at local/lib/perl5/Catalyst.pm line 1963
      	Catalyst::__ANON__() called at local/lib/perl5/Try/Tiny.pm line 76
      	eval {...} called at local/lib/perl5/Try/Tiny.pm line 67
      	Try::Tiny::try(\'CODE(0xd27aa78)\', \'Try::Tiny::Catch=REF(0xcfc2fb0)\') called at local/lib/perl5/Catalyst.pm line 1969
      	Catalyst::handle_request(\'MusicBrainz::Server\', \'env\', \'HASH(0xd18cfc8)\') called at lib/Catalyst/Plugin/AutoRestart.pm line 119
      	Catalyst::Plugin::AutoRestart::handle_request(\'MusicBrainz::Server\', \'env\', \'HASH(0xd18cfc8)\') called at local/lib/perl5/Catalyst/Engine.pm line 856
      	Catalyst::Engine::__ANON__(\'CODE(0xc33bc88)\') called at local/lib/perl5/Plack/Handler/FCGI.pm line 134
      	Plack::Handler::FCGI::run(\'Plack::Handler::FCGI=HASH(0x1624a30)\', \'CODE(0xc2c9780)\') called at local/lib/perl5/Plack/Loader.pm line 88
      	Plack::Loader::run(\'Plack::Loader=HASH(0x15ede00)\', \'Plack::Handler::FCGI=HASH(0x1624a30)\') called at local/lib/perl5/Plack/Runner.pm line 263
      	Plack::Runner::run(\'Plack::Runner=HASH(0x13f0808)\') called at local/bin/plackup line 10
      ';
       at lib/MusicBrainz/Server/Controller.pm line 101
       at lib/Sql.pm line 294"
      Stack trace:
      line 17 MusicBrainz::Server::Model::MB
      line 144 MusicBrainz::Server::Controller
      line 56 MusicBrainz::Server::Controller::Role::Create
      line 322 MusicBrainz::Server
      line 322 MusicBrainz::Server
      line 322 MusicBrainz::Server
      line 286 MusicBrainz::Server
      Request data:
      
      $VAR1 = {
                'query_parameters' => {},
                'body_parameters' => {
                                       'edit-artist.edit_note' => '',
                                       'edit-artist.begin_date.month' => '',
                                       'edit-artist.as_auto_editor' => '1',
                                       'edit-artist.end_date.day' => '',
                                       'edit-artist.end_date.year' => '',
                                       'edit-artist.begin_date.year' => '',
                                       'edit-artist.begin_date.day' => '',
                                       'edit-artist.country_id' => '',
                                       'edit-artist.gender_id' => '',
                                       'edit-artist.not_dupe' => '1',
                                       'edit-artist.ipi_codes.0' => '',
                                       'edit-artist.sort_name' => 'test  test',
                                       'edit-artist.type_id' => '',
                                       'edit-artist.comment' => 'test  test',
                                       'edit-artist.name' => 'test  test',
                                       'edit-artist.end_date.month' => ''
                                     }
              };
                  
      URL: http://musicbrainz.org/artist/create
      

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

              Created:
              Updated:
              Resolved:

                Version Package
                Bug fixes, 2012-09-03