Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-79435

Deleting category with calendar event subscription orphans subscription data

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 4.1.5
    • Calendar
    • 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

      1. Create a course category named 'Doomed Category'
      2. From the calendar go to the import/export page at moodle/calendar/managesubscriptions.php
      3. Create an ICS subscription at the course category level for Doomed category
      4. Observe the data created:
        1. a row is added to the mdl_event_subscriptions table with a categoryid matching the id of Doomed Category
        2. if any events are imported they are added to the mdl_event table with a subscriptionid matching the subscription we just created
      5. Delete Doomed category
        1. Observe the mdl_event table is cleaned and any related events are deleted
        2. the mdl_events_subscription record remains and an error is encountered on the manage subscriptions page until the row is deleted

            Unassigned Unassigned
            benkahn1 Ben Kahn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.