Open tim1mw opened 6 years ago
And what, pray chance may it be thy version number?
Sorry, forgot that. Moodle 3.5 with Essential V3.5.0.1.
Can reproduce, no idea how to fix or why getCalendarMonthData js is being called via an event when there is no calendar on the page and thus no markup containing the calendar (wrapper) with the data for the AJAX call.
Ok, probably because the block is not 'hidden' with its own settings so expects to be 'displayed' and therefore outputs its JS.
month_mini.mustache rendered with JS but not the markup.
Called from calendar_mini.mustache
moodleblock.class.php ->get_content_for_output ->
if ($this->instance->visible) { $bc->content = $this->formatted_contents($output);
->
block_calendar_month::get_content()
Workaround is to hide the calendar block in the hidden block region.
Not sure I can solve this without removing the functionality.
I don't think this can be solved, going to probably remove the functionality.
Have you removed the functionality? I have placed the block calendar in the "hidden from users" region but the blocks are displayed for everybody and I can't reproduce this issue.
I think the problem is related with https://tracker.moodle.org/browse/MDL-62775 . I'm having the same problems with my custom theme.
"Have you removed the functionality?" = no. "I'm having the same problems with my custom theme." are you asking for support with your theme?
No support required... Thank you. I just thought, this issue could be related with the issue I posted and may be it could help to fix it.
Ok, thanks.
As the title says, I have a site where the calendar block has been placed in the block area labelled "Blocks moved into the area below will only be seen by admins". If you then log in as a student, the following error is generated:
Missing required key in single structure: year Error code: invalidparameter
Moving the calendar block out of the admin only area or hiding the block stops the error. My guess is that some calendar code is still being sent for student users and that includes an Ajax call which triggers the error.