Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 202
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 185
Total: 185

Author Topic: Alerts Issue  (Read 1881 times)

0 Members and 1 Guest are viewing this topic.

Offline PapaFrizArcade

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Alerts Issue
« on: March 28, 2022, 09:01:08 pm »
I have spent hour trying to track down my my ALERTS system was so ... buggy.  So iffy.  It would deliver alerts HOURS late... and then in huge bunches of like 8 or 10...

I've been going back and forth with the SMF folks...

I eventually did some testing with Firefox open with one username and Chrome with another testing over and over.

I determined that WITH the problem mod I a user could create a topic ... and any alert he got from within his own topic was fine.  It alerted quickly and without issue.  HOWEVER... if a user responded to a post NOT of his own... and people did something to cause an alert to that person responding... the alert would go in to limbo to be delivered...whenever.  Sometimes delivered hours later... or when a trigger caused it to be delivered with a bunch of others.

SO the devs at SMF had me check some background task table and we determined that a mod was likely causing the issue.

So I went to my sandbox.  Fresh SMF install.  I then installed the mods i have installed one at a time and tested.

When I got to this Ratings mod.  It appears to break the system.  When installed,  I no longer have "reliable" alerts that take only seconds to arrive.  I also can build up a bunch of rating alerts... which wont trigger... then QUOTE and they will all trigger at the same time.... etc... basically the same behavior i've been getting complaints abuot.

I have uninstalled the mod from the system and I am asking my users to please test.  They are the ones who noticed the issue (I don't do alerts all too much)... But I am pretty confident in my findings as I have done some pretty extensive testing.  This has been driving me nuts for weeks and today I decided to figure it out.




Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Alerts Issue
« Reply #1 on: March 28, 2022, 09:50:19 pm »
I am using the standard code based on the topic you shared with me on the SMF site.

Adding a reaction uses
Code: [Select]
$smcFunc['db_insert']('insert',
'{db_prefix}background_tasks',
array('task_file' => 'string', 'task_class' => 'string', 'task_data' => 'string', 'claimed_time' => 'int'),
array('$sourcedir/tasks/AwesomePost-Notify.php', 'AwesomePost_Notify_Background', $smcFunc['json_encode'](array(
'sender_id' => $user_info['id'],
'sender_name' => $user_info['name'],
'ratetype' => $ratetype,
'topic' => $topicID,
'msg' => $msgID,
'id_given_member' => $id_given_member,
'time' => time(),
)), 0),
array('id_task')
);

Then SMF calls the AwesomePost-Notify.php


I compared to SMF's like system which uses alerts too. I do not see anything unusual with our implementation. Is the issue with one rating or if multiple people rate a message? I am not sure if it is with the volume of ratings? Causing an issue since you have lot of reactions occurring on your site.

Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline PapaFrizArcade

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Alerts Issue
« Reply #2 on: March 28, 2022, 10:00:31 pm »
I am not sure.  All I can say FOR SURE is that when I install the ratings mod,  it affects the alerts mod negatively... causing delay issues for alerts... sometimes minutes... sometimes hours.

When they come in,  at times they are bunched up with multiple alerts... sometimes not.

What I know:

I was having issues on my current forum.  I used a bone stock SMF install to determine that it was the ratings mod by going one by one through my mods (luckily ratings was mod number 4 or 5).  When I got to the ratings mod the issue immediately appeared.  I then came to my live site.  I removed the ratings mod.  The issue immediately stopped.

I am VERY much interested in figuring out how/why.  We like the ratings mod... and don't want to lose it.  But these are the only real concrete 'facts' I can provide at this point.

I am as confused as you are.
« Last Edit: March 28, 2022, 10:02:33 pm by PapaFrizArcade »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Alerts Issue
« Reply #3 on: March 28, 2022, 10:02:26 pm »
I posted one why on smf coding board. I want to see if the content id matters. There is not much documentation on how the feature works for alerts. So that is just a guess on my end.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline PapaFrizArcade

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Alerts Issue
« Reply #4 on: March 28, 2022, 10:03:57 pm »
Awesome.  I hope it's something easy to fix.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Alerts Issue
« Reply #5 on: March 28, 2022, 10:23:15 pm »
On your test site. Reinstall the mod.
And copy this to sources/tasks folder after it is installed and try again
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline PapaFrizArcade

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Alerts Issue
« Reply #6 on: March 28, 2022, 10:38:14 pm »
Will try...

Offline PapaFrizArcade

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Alerts Issue
« Reply #7 on: March 28, 2022, 10:53:17 pm »
Unfortunately... that did not work.


They arrive in the ALL ALERTS section (as they did before)... but they do not trigger the ALERTS(#) drop down at the top of the front page.  If you click in to the ALL ALERTS you see them in there with a MARK READ button instead of a MARK UNREAD button... and they will sit there for a varying amount of time until eventually they are triggered to show up top at some point... at which time maybe 8 to 10 have accrued and it's 2 hours later.

Remove the mod... all alerts are sent in seconds... no accrual...

[ Guests cannot view attachments ]

Offline PapaFrizArcade

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Alerts Issue
« Reply #8 on: March 28, 2022, 11:07:42 pm »
Noted behavior.  With mod installed i can accrue up reaction alerts.  They will appear in the ALL ALERTS section with the button indicating they've not been read.  They will sit there for however long.  But I can force them to alert to to the top ALERT (#) drop down.  If I QUOTE the user who has the reaction alerts accrued up it will trigger something that will force all of the alerts to hit at once (the batch alerts situation i mentioned above).

Offline PapaFrizArcade

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Alerts Issue
« Reply #9 on: March 28, 2022, 11:18:16 pm »
Oh,  and a minor non-related "issue".  There is no alert sent for "unrating" a post.


Offline PapaFrizArcade

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Alerts Issue
« Reply #10 on: March 29, 2022, 07:32:51 am »
BTW... would I have had to hard-refresh when testing that last php file you sent?  I am not sure if I did to be 100% honest.


Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Alerts Issue
« Reply #11 on: March 29, 2022, 08:10:37 am »
Try this file made another change. I think this might be the fix!
No hard refresh required.

Copy to sources/tasks folder
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline PapaFrizArcade

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Alerts Issue
« Reply #12 on: March 29, 2022, 08:35:16 am »
...installing...

Offline PapaFrizArcade

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Alerts Issue
« Reply #13 on: March 29, 2022, 08:50:20 am »
OK...

ALERTS APPEAR TO BE FIXED ... mostly.

They are arriving on time!!  Awesome!!

HOWEVER...

When you click on the ratings alert ... it takes you to the wrong post ... entirely.

I rated the ALERTS TESTING thread... and the account that got the alert ends up in a thread called "DYING...." when clicked.

 :o



Offline PapaFrizArcade

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Alerts Issue
« Reply #14 on: March 29, 2022, 08:53:19 am »
Quote
I just got another rating alert for a post here:

CodeSelect
https://www.aha-forums.com/index.php?topic=85.msg1522#msg1522

Note the msgId is 1522.  The last weird rating alert I got was for msgId==1521.


A message from a user... I'm guessing it could be helpful?

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
10068 Views
Last post April 04, 2013, 08:59:07 pm
by SMFHacks
7 Replies
5187 Views
Last post July 20, 2013, 08:04:23 am
by SMFHacks
2 Replies
4626 Views
Last post May 16, 2016, 08:32:36 am
by dan4ever
7 Replies
1046 Views
Last post March 12, 2022, 07:47:58 pm
by SMFHacks
7 Replies
1063 Views
Last post March 11, 2022, 07:37:06 am
by PapaFrizArcade

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal