-
Bug
-
Resolution: Fixed
-
Major
-
3.4.4, 3.5.1
-
MOODLE_34_STABLE, MOODLE_35_STABLE
-
MOODLE_34_STABLE, MOODLE_35_STABLE
-
MDL-62889_master -
While testing one of our community sites upgraded to 3.5.1:
- I saw there are two unread notifications
- I clicked the bell icon icon to open the notifications popup
- When hovering an unread notification, the link URL was https://site.url/message/output/popup/mark_notification_read.php?notificationid=1&redirecturl=null (see the null)
- When clicking it, I ended up on https://site.url/message/output/popup/null which throws 404 HTTP error
Thanks markn who promptly and correctly debugged this as a likely regression of MDL-56498. In that issue, we introduce
+ // Link to mark read page before loading the actual link.
|
+ notification.contexturl = URL.relativeUrl('message/output/popup/mark_notification_read.php', {
|
+ redirecturl: notification.contexturl,
|
+ notificationid: notification.id,
|
+ });
|
to message/output/popup/amd/src/notification_popover_controller.js
But apparently, the notification.contexturl can be NULL. We should not include redirecturl as the link parameter in that case.