Moodle Calendar Events Stop Opening

Moodle Calendar Events Stop Opening

by Jeff Columb -
Number of replies: 1

I'm not sure exactly when the problem started but it exists on Moodle 3.9.3 and 3.9.4 with the adaptable theme.

One site:  Moodle 3.9.3+ (Build: 20210108), Adaptable Release 3.9.1.0, version 2020073107

Another site: Moodle 3.9.4 (Build: 20210118), Adaptable Release 3.9.1.1, version 2020073108

When selecting Calendar events, the first event loads: [moodle_url]/calendar/view.php?view=day&time=1615352400
And displays the selected event.

Selecting a Calendar event from that page loads: [moodle_url]/calendar/view.php?view=day
And displays the selected event.

After which selecting a calendar event refreshes the page.
And does not display the selected event.

This is a problem across multiple Moodles that we host and multiple versions from at least 3.9.3 and including 3.9.4; We have not yet updated any site to 3.9.5 or 3.9.6. I have not seen any errors related to this in the logs. And I don't see any errors in the browser console during test. As well as no errors on the page when debugging is turned on. I have been stumped by this and am hoping someone else has encountered this and maybe knows a quick fix that I've missed with tunnel vision.

Average of ratings: -
In reply to Jeff Columb

Re: Moodle Calendar Events Stop Opening

by Jeff Columb -
I noticed that after selecting an event from the calendar it would only load the data of one more event on the page (left-click) before it would cease to open events; opening in a new tab or window would work every time. I noticed that although the event data loaded within div.calendarwrapper, the page title and the breadcrumbs, and even the $_GET and $_POST data, remained that of the original event. Which suggests a javascript/jquery event is loading the calendar event data within the calendarwrapper element instead of reloading the page but is somehow getting stopped after the first new event.

I believe I have found a workaround. I'm not sure if there is an underlying problem with the code, a conflict with the adaptable theme, or some sort of conflict with the site caching. But once I tracked down the problem I only had to remove the line ' }} data-region="mini-day-link"{{! ' from the file '/calendar/templates/minicalendar_day_link.mustache' to get the links to properly load each time they are clicked on dev. This reloads the entire page instead of just loading the event data within the calendarwrapper div. But at least it restores expected functionality.