Won't fix {$visitor.alerts_unread} value incorrect

king8084

Well-known member
Affected version
1.5
xf 1.5

per default 30-day unread alerts purge (see here), the value stored in {$visitor.alerts_unread} is not accurate. the value stored in this var is representative of the pre-30-day-purge, and does not reflect the number of unread alerts that are still accessible by the user. ex:

- send test user 2 alerts
- wait 31 days
- alert count shows 2 in navigation_visitor_tab due to outputting {xen:number $visitor.alerts_unread}
- hover over alerts dropdown, alerts drop to 0 and no alerts are available for viewing

problems:
- obvious problem: {$visitor.alerts_unread} stores incorrect accessible/viewable value
- from what i can tell, there's no way to get a proper count to override the var used in navigation_visitor_tab. is there a way to display the correct count to the user??? causing problems for some things i've been developing. open to any workarounds.
 
as a possible workaround:
i'm able to get the correct count by looping over {$alertsUnread} in 'account_alerts_popup', however, setting that count value to a local var doesn't make it available in 'navigation_visitor_tab' to output in place of {$visitor.alerts_unread}... from what i've read, there may not be a good way to pass my local/custom var from 'account_alerts_popup' to 'navigation_visitor_tab'...again, open to any suggestions.
 
...problem might also stem from the fact that $alertsUnread seems to store the correct value/count, but is NOT available in $visitor, while alerts_unread stores the incorrect value, but IS available in $visitor
 
Back
Top Bottom