Uploaded image for project: 'MusicBrainz Style'
  1. MusicBrainz Style
  2. STYLE-2587

Changing a relationship with a date to one without throws a server error upon submission.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Normal Normal
    • None
    • None
    • Relationships
    • None

      So, if I grab a relationship such as "composed / composer", with an attributed date:

      then change it to, for instance, "previous attribution / previously attributed to":

      The date will remain even if the new relationship has no date values. Then upon submission, the edit will fail and throw the following server error:

       

      Internal server error
      Oops, something went wrong!
      Error:
      The edit could not be created. Exception (MusicBrainz::Server::Exceptions::DatabaseError): P0001 DBD::Pg::st execute failed: ERROR: Attempt to add dates to a relationship type that does not support dates. CONTEXT: PL/pgSQL function check_has_dates() line 12 at RAISE [for Statement "INSERT INTO link (ended,end_date_month,end_date_year,begin_date_month,link_type,attribute_count,begin_date_day,end_date_day,begin_date_year) VALUES (?,?,?,?,?,?,?,?,?) RETURNING id" with ParamValues: 1='1', 2='8', 3='1972', 4='8', 5='834', 6='0', 7=undef, 8=undef, 9='1972'] at lib/MusicBrainz/Server/Controller.pm line 88. at lib/Sql.pm line 364. at lib/MusicBrainz/Server/Model/MB.pm line 20 MusicBrainz::Server::Model::MB::with_transaction(?, ?) called at lib/MusicBrainz/Server/Controller.pm line 197 MusicBrainz::Server::Controller::edit_action(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) called at lib/MusicBrainz/Server/Controller/Role/EditRelationships.pm line 378 MusicBrainz::Server::Controller::Work::edit_action(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) called at lib/MusicBrainz/Server/Controller/Role/Edit.pm line 86 Catalyst::dispatch(?) called at lib/MusicBrainz/Server.pm line 401 MusicBrainz::Server::__ANON__ at lib/MusicBrainz/Server.pm line 366 MusicBrainz::Server::with_translations(?, ?) called at lib/MusicBrainz/Server.pm line 402 Class::MOP::Method::Wrapped::__ANON__(?) called at lib/MusicBrainz/Server.pm line 416 Class::MOP::Method::Wrapped::__ANON__(?) called at lib/MusicBrainz/Server.pm line 535
       
      Date and time: 2024-08-26T23:57:08.511Z
      Host: 91b8a98536ff
      Interface language: en
      URL: https://musicbrainz.org/work/e975d926-1b8a-47bd-949e-1485a725dbc2/edit
      Request data:
      { "body_parameters": { "edit-work.url.1.period.begin_date.month": "", "edit-work.url.0.relationship_id": "443217", "edit-work.url.0.text": "http://www.lesluthiers.es/op001.htm", "edit-work.attributes.0.value": "98786", "edit-work.url.1.period.begin_date.year": "", "edit-work.attributes.0.type_id": "24", "edit-work.url.0.link_type_id": "921", "edit-work.url.1.period.end_date.month": "", "edit-work.rel.0.entity0_credit": "", "edit-work.url.0.period.end_date.year": "", "edit-work.edit_note": "", "edit-work.rel.0.link_type_id": "834", "edit-work.url.1.period.ended": "0", "edit-work.url.0.period.ended": "0", "edit-work.url.1.text": "https://lesluthiers.org/verobra.php?ID=1", "edit-work.url.1.relationship_id": "443216", "edit-work.rel.0.backward": "1", "edit-work.rel.0.target": "c3078f7b-5a1a-4951-9d43-fc23a1b00058", "edit-work.rel.0.period.end_date.day": "", "edit-work.url.1.link_type_id": "921", "edit-work.iswcs.0": "T-037.117.807-2", "edit-work.type_id": "3", "edit-work.url.0.period.begin_date.year": "", "edit-work.rel.0.period.begin_date.month": "8", "edit-work.rel.0.period.begin_date.year": "1972", "edit-work.rel.0.period.begin_date.day": "", "edit-work.name": "Cantata Laxatón", "edit-work.rel.0.period.end_date.year": "1972", "edit-work.rel.0.period.end_date.month": "8", "edit-work.comment": "", "edit-work.url.1.period.end_date.day": "", "edit-work.url.0.backward": "1", "edit-work.url.0.period.begin_date.day": "", "edit-work.url.0.period.begin_date.month": "", "edit-work.rel.0.period.ended": "1", "edit-work.rel.0.relationship_id": "3798159", "edit-work.url.1.period.end_date.year": "", "edit-work.languages.0": "393", "edit-work.url.0.period.end_date.month": "", "edit-work.url.1.period.begin_date.day": "", "edit-work.url.1.backward": "1", "edit-work.rel.0.entity1_credit": "", "edit-work.url.0.period.end_date.day": "" }, "query_parameters": {} }
       
      We're terribly sorry for this problem. Please wait a few minutes and repeat your request — the problem may go away.
      

       

       

            reosarevok Nicolás Tamargo
            Muxxer Muxxer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package