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

"Add another" button does not clear attributes causing an internal server error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Normal Normal
    • None
    • None
    • Editing interface
    • None

      To reproduce:

      • Open the add artist page, enter a name and sortname
      • Click "Add relationship"
      • Select an artist, the "member" relationship type and the "founded" attribute, then click "Done"
      • Click "Add another artist"
      • Select another artist and the "children" relationship type, then click "Done"
      • Submit the edits

      Expected behaviour: The "founded" attribute is cleared when changing the relationship type, so it's not included on the "children" relationship.
      Actual behaviour: The "founded" attribute remains, even though the relationship type has been changed and submitting the form produces the following ISE:

      Error:

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

      Unknown macro: { 'edit-artist.edit_note' => '', 'edit-artist.end_area.name' => '', 'edit-artist.begin_area.gid' => '', 'edit-artist.period.end_date.month' => '', 'edit-artist.area_id' => '', 'edit-artist.rel.0.attributes.0.type.gid' => '4fd3b255-a7d7-4424-9a63-40fa543b601c', 'edit-artist.area.gid' => '', 'edit-artist.period.end_date.year' => '', 'edit-artist.period.end_date.day' => '', 'edit-artist.comment' => '', 'edit-artist.end_area_id' => '', 'edit-artist.name' => '1111111111110', 'edit-artist.rel.1.attributes.0.type.gid' => '4fd3b255-a7d7-4424-9a63-40fa543b601c', 'edit-artist.begin_area.name' => '', 'edit-artist.area.name' => '', 'edit-artist.rel.1.target' => 'f6769c45-02ff-4dd8-b027-4351248f25b0', 'edit-artist.isni_codes.0' => '', 'edit-artist.end_area.gid' => '', 'edit-artist.rel.0.target' => '3a40a4c9-67ab-4887-90ab-2d7972f9e5b0', 'edit-artist.begin_area_id' => '', 'edit-artist.period.begin_date.year' => '', 'edit-artist.gender_id' => '', 'edit-artist.ipi_codes.0' => '', 'edit-artist.period.begin_date.month' => '', 'edit-artist.sort_name' => '1', 'edit-artist.type_id' => '', 'edit-artist.rel.0.link_type_id' => '103', 'edit-artist.rel.1.link_type_id' => '109', 'edit-artist.period.begin_date.day' => '' }

      ;

      Exception:$VAR1 = 'Could not create MusicBrainz::Server::Edit::Relationship::Create edit

      {
      attributes => [
      {
      type => {
      gid => "4fd3b255-a7d7-4424-9a63-40fa543b601c",
      id => 525,
      name => "founder",
      root =>

      Unknown macro: { gid => "4fd3b255-a7d7-4424-9a63-40fa543b601c", id => 525, name => "founder" }

      }
      }
      ],
      ended => 0,
      entity0 => bless( {
      begin_date => bless( {}, \'MusicBrainz::Server::Entity::PartialDate\' ),
      comment => "",
      edits_pending => 0,
      end_date => bless( {}, \'MusicBrainz::Server::Entity::PartialDate\' ),
      ended => 0,
      gid => "d9f55cfb-662d-45da-a4e5-ae4521efda83",
      id => 1123996,
      ipi_codes => [],
      isni_codes => [],
      last_updated => bless( {
      formatter => undef,
      local_c =>

      Unknown macro: { day => 1, day_of_quarter => 62, day_of_week => 1, day_of_year => 335, hour => 9, minute => 42, month => 12, quarter => 4, second => 11, year => 2014 }

      ,
      local_rd_days => 735568,
      local_rd_secs => 34931,
      locale => bless(

      Unknown macro: { default_date_format_length => "medium", default_time_format_length => "medium", en_complete_name => "English United States", en_language => "English", en_territory => "United States", id => "en_US", native_complete_name => "English United States", native_language => "English", native_territory => "United States" }

      , \'DateTime::Locale::en_US\' ),
      offset_modifier => 0,
      rd_nanosecs => 750751000,
      tz => bless(

      Unknown macro: { name => "UTC" }

      , \'DateTime::TimeZone::UTC\' ),
      utc_rd_days => 735568,
      utc_rd_secs => 34931,
      utc_year => 2015
      }, \'DateTime\' ),
      name => "1111111111110",
      sort_name => 1
      }, \'MusicBrainz::Server::Entity::Artist\' ),
      entity1 => bless( {
      begin_date => bless( {}, \'MusicBrainz::Server::Entity::PartialDate\' ),
      comment => "US rapper",
      edits_pending => 0,
      end_date => bless( {}, \'MusicBrainz::Server::Entity::PartialDate\' ),
      ended => 0,
      gid => "f6769c45-02ff-4dd8-b027-4351248f25b0",
      id => 966689,
      ipi_codes => [],
      isni_codes => [],
      last_updated => bless( {
      formatter => undef,
      local_c =>

      Unknown macro: { day => 17, day_of_quarter => 17, day_of_week => 4, day_of_year => 17, hour => 20, minute => 45, month => 1, quarter => 1, second => 11, year => 2013 }

      ,
      local_rd_days => 734885,
      local_rd_secs => 74711,
      locale => $VAR1->

      Unknown macro: {entity0}
      Unknown macro: {last_updated}
      Unknown macro: {locale}

      ,
      offset_modifier => 0,
      rd_nanosecs => 633142000,
      tz => $VAR1->

      Unknown macro: {last_updated}
      Unknown macro: {tz}

      ,
      utc_rd_days => 734885,
      utc_rd_secs => 74711,
      utc_year => 2014
      }, \'DateTime\' ),
      name => "Test",
      sort_name => "Test"
      }, \'MusicBrainz::Server::Entity::Artist\' ),
      link_order => 0,
      link_type => bless(

      Unknown macro: { attributes => [], child_order => 0, description => "Indicates a parent-child relationship.", entity0_cardinality => 0, entity0_type => "artist", entity1_cardinality => 0, entity1_type => "artist", gid => "9421ca84-934f-49fe-9e66-dea242430406", has_dates => 1, id => 109, is_deprecated => 0, link_phrase => "children", long_link_phrase => "is the parent of", name => "parent", orderable_direction => 0, parent_id => 113, priority => 0, reverse_link_phrase => "parents" }

      , \'MusicBrainz::Server::Entity::LinkType\' )
      }

      Attribute 525 is unsupported for link type 109 at lib/MusicBrainz/Server/Edit/Relationship.pm line 27, line 3.
      at lib/MusicBrainz/Server/Data/Edit.pm line 456.
      ';
      at lib/MusicBrainz/Server/Controller.pm line 104.
      at lib/Sql.pm line 330.
      at lib/Sql.pm line 330."

      Stack trace:
      line 19 MusicBrainz::Server::Model::MB
      line 203 MusicBrainz::Server::Controller
      line 135 MusicBrainz::Server::Controller::Role::EditRelationships
      line 88 MusicBrainz::Server::Controller::Role::Create
      line 329 MusicBrainz::Server
      line 303 MusicBrainz::Server
      line 330 MusicBrainz::Server
      line 344 MusicBrainz::Server
      line 389 MusicBrainz::Server

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

      Unknown macro: { 'edit-artist.edit_note' => '', 'edit-artist.end_area.name' => '', 'edit-artist.period.end_date.month' => '', 'edit-artist.begin_area.gid' => '', 'edit-artist.rel.0.attributes.0.type.gid' => '4fd3b255-a7d7-4424-9a63-40fa543b601c', 'edit-artist.area_id' => '', 'edit-artist.period.end_date.year' => '', 'edit-artist.area.gid' => '', 'edit-artist.period.end_date.day' => '', 'edit-artist.comment' => '', 'edit-artist.end_area_id' => '', 'edit-artist.rel.1.attributes.0.type.gid' => '4fd3b255-a7d7-4424-9a63-40fa543b601c', 'edit-artist.name' => '1111111111110', 'edit-artist.begin_area.name' => '', 'edit-artist.area.name' => '', 'edit-artist.rel.1.target' => 'f6769c45-02ff-4dd8-b027-4351248f25b0', 'edit-artist.isni_codes.0' => '', 'edit-artist.rel.0.target' => '3a40a4c9-67ab-4887-90ab-2d7972f9e5b0', 'edit-artist.end_area.gid' => '', 'edit-artist.gender_id' => '', 'edit-artist.period.begin_date.year' => '', 'edit-artist.begin_area_id' => '', 'edit-artist.ipi_codes.0' => '', 'edit-artist.period.begin_date.month' => '', 'edit-artist.type_id' => '', 'edit-artist.sort_name' => '1', 'edit-artist.rel.0.link_type_id' => '103', 'edit-artist.rel.1.link_type_id' => '109', 'edit-artist.period.begin_date.day' => '' }

      };

      Time: 2014-12-01 09:42:12 UTC

      Host: rika

      Interface language: en

            Unassigned Unassigned
            nikki nikki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package