Issue Details (XML | Word | Printable)

Key: MBS-4385
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Ian McEwen
Reporter: Alex Mauer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
MusicBrainz Server

Invalid date causes internal server error

Created: 29/Feb/12 10:47 PM   Updated: 23/Jul/12 05:24 AM   Resolved: 23/Jul/12 05:24 AM
Component/s: None
Affects Version/s: None
Fix Version/s: Bug fixes, 2012-07-23


 Description  « Hide

Entering an AR with an invalid date (e.g. "performance of ... on 1991-11-31" — November 31st does not exist) causes an internal server error.

Obviously it should simply warn the user that the date is invalid.



Sort Order: Ascending order - Click to sort in descending order
Ian McEwen added a comment - 08/Jul/12 04:49 AM

To fix this, it'd be nice to have the actual error pasted somewhere (so it's possible to know where exactly this is failing); if I get to looking at this I'll try to reproduce it myself, but if someone comes by and pastes one first it'd be much appreciated.


Ian McEwen added a comment - 09/Jul/12 08:46 PM
Internal Server Error
Oops, something went wrong!

Error:

Caught exception in MusicBrainz::Server::Controller::Edit::Relationship->create "Date::Calc::PP::Delta_Days(): Date::Calc::Delta_Days(): not a valid date at lib/MusicBrainz/Server/Form/Role/DatePeriod.pm line 36"
Stack trace:
line 36 MusicBrainz::Server::Form::Role::DatePeriod
line 13 MusicBrainz::Server::Form
line 360 MusicBrainz::Server::Controller::Edit::Relationship
line 306 MusicBrainz::Server
line 306 MusicBrainz::Server
line 306 MusicBrainz::Server
line 270 MusicBrainz::Server
Request data:

$VAR1 = {
          'query_parameters' => {
                                  'returnto' => 'http://beta.musicbrainz.org/recording/ea4d5d9f-7a7b-4ce3-b07d-88b8f518efb2#relate_to',
                                  'type1' => 'artist',
                                  'entity1' => '979d01bc-a4da-4c80-8cc1-be40bd35cd5e',
                                  'entity0' => 'ea4d5d9f-7a7b-4ce3-b07d-88b8f518efb2',
                                  'type0' => 'recording'
                                },
          'body_parameters' => {
                                 'ar.edit_note' => 'This should break with an ISE.',
                                 'ar.end_date.month' => '11',
                                 'ar.link_type_id' => '156',
                                 'ar.begin_date.year' => '1991',
                                 'ar.begin_date.month' => '11',
                                 'ar.end_date.day' => '31',
                                 'ar.begin_date.day' => '31',
                                 'ar.end_date.year' => '1991'
                               }
        };
            
URL: http://beta.musicbrainz.org/edit/relationship/create?type0=recording&type1=artist&entity0=ea4d5d9f-7a7b-4ce3-b07d-88b8f518efb2&entity1=979d01bc-a4da-4c80-8cc1-be40bd35cd5e&returnto=http%3A%2F%2Fbeta.musicbrainz.org%2Frecording%2Fea4d5d9f-7a7b-4ce3-b07d-88b8f518efb2%23relate_to

Ian McEwen added a comment - 09/Jul/12 08:46 PM

This seems to only be a problem with the end date; when I only put it into the begin date it correctly returned an 'invalid date' error.


Ian McEwen added a comment - 09/Jul/12 08:48 PM

Also works fine if there's only an end date, though.


Oliver Charles added a comment - 11/Jul/12 11:03 AM

ianmcorvidae/mbs-4385-invalid-date-ISE is now in beta.