Alert Improvements by Xon

Alert Improvements by Xon 2.10.13

No permission to download
@Xon we seem to be having the same issue after upgrading from XF2.1 to XF2.2. Running XF 2.2.4 and Alert Improvements 2.8.20. If members click mark read next to each alert they'll go away, but trying to mark a page of alerts as read doesn't work.

@Xon have you had a chance to look into this? I just updated to 2.8.22 and tried running php cmd.php xf-rebuild:sv-alert-totals, but it had no affect.
 
I've seen this sort of thing break when the javascript gets cached badly.

Can you try from a private browsing session?
Do you have any other add-ons which touch alerts?

This might just be an XF2.2.x compatibility bug, but I haven't had any other reports.
 
Thanks for the reply @Xon.

1. It's the same regardless of browser (standard and private) and device (desktop, tablet, mobile).
2. I don't believe there are any other add-ons which touch alerts.

It seems like it's only happening for some members. A bit more information about a specific member with 1,299 unread alerts. All alert preferences are unchecked ("Keep viewed alerts on the alerts menu", "Keep viewed alerts on the alerts page, and "Do not summarize alerts").

If they go to account_alerts and click the Mark Read button at the top (to mark all alerts on the current page read), the <li> class changes from is-unread to is-recently-read. Refresh the page and the alerts are still there, and is-unread is back. If you go through and click Mark Read next to each of the alerts they disappear and remain gone.

@CarpCharacin @Iggy Are you guys still having this issue?
 
Thanks for the reply @Xon.

1. It's the same regardless of browser (standard and private) and device (desktop, tablet, mobile).
2. I don't believe there are any other add-ons which touch alerts.

It seems like it's only happening for some members. A bit more information about a specific member with 1,299 unread alerts. All alert preferences are unchecked ("Keep viewed alerts on the alerts menu", "Keep viewed alerts on the alerts page, and "Do not summarize alerts").

If they go to account_alerts and click the Mark Read button at the top (to mark all alerts on the current page read), the <li> class changes from is-unread to is-recently-read. Refresh the page and the alerts are still there, and is-unread is back. If you go through and click Mark Read next to each of the alerts they disappear and remain gone.

@CarpCharacin @Iggy Are you guys still having this issue?
My forums have had some issues for some time as well. Users can mark all alerts as read and the alerts disappear temporarily. But they will come back eventually. I'm not sure what causes this. I came here to troubleshoot the issue lol.
 
My forums have had some issues for some time as well. Users can mark all alerts as read and the alerts disappear temporarily. But they will come back eventually. I'm not sure what causes this. I came here to troubleshoot the issue lol.

Sucks to hear you're having the same issue, but I'm happy I'm not alone. I've spent so much time trying to figure this out, not really sure what to do next.
 
I think I've tracked this down to XenForo 2.2+ being vastly more aggressive than I expected at marking alerts as non-auto-read. This results in the auto-read behaviour not remotely working as expected.

I'll double check that the bulk mark-read behaviour is correctly just marking everything as read as I think there was an edge case I was missing.
 
I think I've tracked this down to XenForo 2.2+ being vastly more aggressive than I expected at marking alerts as non-auto-read. This results in the auto-read behaviour not remotely working as expected.

I'll double check that the bulk mark-read behaviour is correctly just marking everything as read as I think there was an edge case I was missing.

Hey @Xon - could you check into the bug that a number of us reported a while back when 2.2 came out, where the Alerts pop-up skips mark read, and Alerts page skips mark read options don't seem to be working?

 
I think I've tracked this down to XenForo 2.2+ being vastly more aggressive than I expected at marking alerts as non-auto-read. This results in the auto-read behaviour not remotely working as expected.

I'll double check that the bulk mark-read behaviour is correctly just marking everything as read as I think there was an edge case I was missing.

Thank you! Let me know if you need examples, information, or access to our dev instance.

Hey @Xon - could you check into the bug that a number of us reported a while back when 2.2 came out, where the Alerts pop-up skips mark read, and Alerts page skips mark read options don't seem to be working?


I think this is what we're talking about above :)
 
What's the status? :cool:
I haven't had time to work on this add-on recently. I'm hopeful in the next 1-3 weeks I'll have time.

The actual source of the issue is this code in the stock XenForo alerts src/XF/Notifier/AbstractNotifier.php;
PHP:
        protected function basicAlert(
                \XF\Entity\User $receiver, $senderId, $senderName,
                $contentType, $contentId, $action, array $extra = [], array $options = []
        )
        {
                // generic alerts default to autoRead=true, but notification alerts normally relate to specific content
                // so we can default them to false
              if (!isset($options['autoRead']))
              {
                      $options['autoRead'] = false;
              }
If you comment out this out, you'll get pre-XF2.2 behaviour
 
I wonder where did I mess up.

This error appears when I try to send a new message. The message goes through, though.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Last edited:
I haven't had time to work on this add-on recently. I'm hopeful in the next 1-3 weeks I'll have time.

The actual source of the issue is this code in the stock XenForo alerts src/XF/Notifier/AbstractNotifier.php;
PHP:
        protected function basicAlert(
                \XF\Entity\User $receiver, $senderId, $senderName,
                $contentType, $contentId, $action, array $extra = [], array $options = []
        )
        {
                // generic alerts default to autoRead=true, but notification alerts normally relate to specific content
                // so we can default them to false
              if (!isset($options['autoRead']))
              {
                      $options['autoRead'] = false;
              }
If you comment out this out, you'll get pre-XF2.2 behaviour
I'm unbelievable stupid. I commented the whole file out, rather than the section you mentioned. I'm an idiot lmao
 
Damn, the error persist. I wonder if I've done everything correctly. I don't think so >.<

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Damn, the error persist. I wonder if I've done everything correctly. I don't think so >.<

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
Just comment out the line;
PHP:
$options['autoRead'] = false;
 
I no longer seem to have any issues with the alerts. I have no clue what caused it or how it got fixed. But I'm glad to see the notifications working again. @Joe Link, what's your status?
 
I no longer seem to have any issues with the alerts. I have no clue what caused it or how it got fixed. But I'm glad to see the notifications working again. @Joe Link, what's your status?

Good to hear! Did you edit the PHP file as @Xon mentioned above?

It seems we're still having the issue, but I didn't edit the file (I try to avoid editing PHP files whenever possible). Hoping that XF/Xon come up with a fix or workaround :)
 
I haven't had time to work on this add-on recently. I'm hopeful in the next 1-3 weeks I'll have time.
We appreciate you are really busy @Xon - any update on this? Only asking as we have just upgraded a couple of sites to XF 2.2 and the sticking alerts issue has been reported by some users, regardless of what they tick/untick in their user preferences. Thanks.
 
Last edited:
Top Bottom