Closed davidscotson closed 6 days ago
Hi @davidscotson ,
many thanks for raising this issue.
I can reproduce the JavaScript console error on Moodle 4.5 but also on older versions down to 4.1. I will investitate and hopefully fix it shortly.
Regarding your additional comment that the starred courses feature is shown for other active themes as well, you are completely right. We have missed that detail in the initial implementation. I have just pushed a PR on #762 to fix that and have created #761 for some volunteer to cover it with tests.
Cheers, Alex
I think I found the reason for the JS console error as well: When building the starred courses feature, a JS line had been adopted by mistake from the notifications popover: https://github.com/moodle-an-hochschulen/moodle-theme_boost_union/pull/762/commits/d46182317e638d0e329ebb2c0bb01b0e44824957
This is removed now in the updated PR.
Describe the bug On our 4.5 test site, enabling the "Show starred courses popover in the navbar" option in the settings causes a JS console error on every page.
To Reproduce Steps to reproduce the behavior:
/admin/settings.php?section=theme_boost_union_feel
Uncaught TypeError: controller.registerEventListeners is not a function
Additional context When investigating this I switched between themes using the
?theme=
functionality. The error persisted across other themes, and the star continued to be displayed in the navbar on Classic and vanilla Boost themes. After selecting a different theme in the settings to switch the theme entirely, the star in the navbar was still visible and active if enabled in Boost Union. I'm assuming that's not intended either.