Details
Description
When trying to test something, I had a calendar entry with an empty summary. It killed the entire ical import:
BEGIN:VEVENT
|
DTSTART:20100324T150000Z
|
DTEND:20100324T153000Z
|
DTSTAMP:20150408T150240Z
|
ORGANIZER;CN=poltawsk@exchange.lancs.ac.uk:mailto:poltawsk@exchange.lancs.a
|
c.uk
|
UID:{BBFC7BB7-F760-4D1E-A095-06D59F8CEF41}
|
CREATED:20100324T091751Z
|
DESCRIPTION:Hi REDACTED\,\n\nSorry for short notice - could we have 'one to on
|
e' today?\n\nI hope to be free this afternoon so suggest a time of 3 - 3.30
|
pm\, but thats entirely flexible (particularly as I might need to dash off
|
to let furniture delivery people in..)\n\nI have no agenda - the objective
|
is just a private catchup. But please reschedule if the time doesn't suit a
|
nd you want more time to prepare etc.. \n\nDan
|
LAST-MODIFIED:19700101T000000Z
|
LOCATION:One to One
|
SEQUENCE:2
|
STATUS:CONFIRMED
|
SUMMARY:
|
TRANSP:OPAQUE
|
END:VEVENT
|
First of all, the debugging is terrible:
Coding error detected, it must be fixed by a programmer: {$a}
|
|
More information about this error
|
|
Debug info:
|
Error code: codingerror
|
Stack trace:
|
line 463 of /lib/setuplib.php: moodle_exception thrown
|
line 83 of /calendar/managesubscriptions.php: call to print_error()
|
So to fix that I had to do:
diff --git a/calendar/managesubscriptions.php b/calendar/managesubscriptions.php
|
index a83b90f..d127a20 100644
|
--- a/calendar/managesubscriptions.php
|
+++ b/calendar/managesubscriptions.php
|
@@ -80,7 +80,7 @@ if (!empty($formdata)) {
|
} catch (moodle_exception $e) {
|
// Delete newly added subscription and show invalid url error.
|
calendar_delete_subscription($subscriptionid);
|
- print_error($e->errorcode, $e->module, $PAGE->url);
|
+ throw $e;
|
}
|
}
|
// Redirect to prevent refresh issues.
|
And then you get the real error:
Coding error detected, it must be fixed by a programmer: The 'name' value must be set in other.
|
|
More information about this error
|
|
Debug info:
|
Error code: codingerror
|
Stack trace:
|
line 108 of /lib/classes/event/calendar_event_created.php: coding_exception thrown
|
line 252 of /lib/classes/event/base.php: call to core\event\calendar_event_created->validate_data()
|
line 2272 of /calendar/lib.php: call to core\event\base::create()
|
line 2668 of /calendar/lib.php: call to calendar_event->update()
|
line 2989 of /calendar/lib.php: call to calendar_event::create()
|
line 3113 of /calendar/lib.php: call to calendar_add_icalendar_event()
|
line 3157 of /calendar/lib.php: call to calendar_import_icalendar_events()
|
line 79 of /calendar/managesubscriptions.php: call to calendar_update_subscription_events()
|
Attachments
Issue Links
- Discovered while testing
-
MDL-49684 Replace custom Moodle timezone stuff with standard PHP date/time code
-
- Closed
-