View Issue Details

IDProjectCategoryView StatusLast Update
4930Composr alpha bug reportsGeneral / Uncategorisedpublic2022-09-15 01:30
ReporterPDStig Assigned ToChris Graham  
PrioritynormalSeverityminor 
Status resolvedResolutionfixed 
Summary4930: sources/notifications2.php trying to access NTYPE on a Tempcode object
DescriptionLine 180 in notifications2.php is "$ntype = $notification_type['NTYPE'];", which comes from a for loop on $notification_code['NOTIFICATION_TYPES'].

However, $notification_code['NOTIFICATION_TYPES'] is set to $notification_types_tempcode on line 158 when it should be set to $notification_types.

This fix does, however, break the template, so we also need to add "'NOTIFICATION_TYPES_TEMPCODE' => $notification_types_tempcode," after line 158. Then, modify NOTIFICATIONS_MANAGE.tpl to use {NOTIFICATION_TYPES_TEMPCODE} instead of {NOTIFICATION_TYPES} .
TagsNo tags attached.
Attach Tags
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

PDStig

2022-09-10 04:46

administrator   ~7506

(Would also need fixing in admin-notifications)

Chris Graham

2022-09-15 01:30

administrator   ~7511

I had very recently optimised the code to not generate an enormous Tempcode tree for the entire screen, given the memory issues we're having with the notification UI.
The code had in hackerish way accessed the array structure used for the Tempcode tree (during setting saving).
The correct fix was to clean up the code to not need to do that, having a proper data structure for what settings are active on the UI.

Issue History

Date Modified Username Field Change
2022-09-10 03:56 PDStig New Issue
2022-09-10 04:46 PDStig Note Added: 0007506
2022-09-15 01:30 Chris Graham Assigned To => Chris Graham
2022-09-15 01:30 Chris Graham Status Not Assigned => Resolved
2022-09-15 01:30 Chris Graham Resolution open => fixed
2022-09-15 01:30 Chris Graham Note Added: 0007511
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised