-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
4.1.5
-
None
-
MOODLE_401_STABLE
If you create a course category level event subscription, then delete the course category any events are deleted from the calendar, but the subscription remains with an invalid category ID. This causes an error on the Import/Export calendars screen:
Unknown category with category ID number "{$a}"More information about this errorDebug info: |
Error code: unknowncategory×Dismiss this notificationStack trace:line 2068 of /lib/pagelib.php: moodle_exception thrownline 1460 of /lib/pagelib.php: call to moodle_page->load_category()line 45 of /calendar/managesubscriptions.php: call to moodle_page->set_category_by_id() |
Replication Steps
- Create a course category named 'Doomed Category'
- From the calendar go to the import/export page at moodle/calendar/managesubscriptions.php
- Create an ICS subscription at the course category level for Doomed category
- Observe the data created:
- a row is added to the mdl_event_subscriptions table with a categoryid matching the id of Doomed Category
- if any events are imported they are added to the mdl_event table with a subscriptionid matching the subscription we just created
- Delete Doomed category
- Observe the mdl_event table is cleaned and any related events are deleted
- the mdl_events_subscription record remains and an error is encountered on the manage subscriptions page until the row is deleted