Forums | Mahara Community
Support
/
Watchlist sending Multiple emails
29 October 2025, 1:38
Hi,
I have recently had to turn off Watchlist notifications on our site as it was spamming users with updates to pages at all hours of the day even when it appears no updates have been made to watchlisted pages. Would anybody know why this is happening and anyway to stop this and keep the functionality useable?
Thanks,
Michael
29 October 2025, 14:59
Hi Michael,
The watchlist notifications sent out are based on what is in the 'watchlist_queue' database table.
Can you confirm that when the emails are sent out that the rows are removed from the table?
Also if you just view a page does it create a row in the watchlist_queue table? It shouldn't but could explain the behaviour you are seeing.
Hope that helps
Robert
26 November 2025, 0:54
Hi Robert,
Sorry for the delay in my reply I havent had the time to proberly look into this until now.
I can confirm that when emails are sent they are removed from the watchlist_queue database table.
Also viewing the page does not create a row in the watchlist_queue.
Is there a way for me to see changes being made to these pages that are sending out watchlist emails? I doubt users would be making changes to these pages every hour into the early hours of the morning.
Thanks,
Michael
26 November 2025, 9:44
Hi Michael,
Looking at the events that happen in Mahara there are these:
'event' => 'saveartefact',
'event' => 'saveview',
'event' => 'blockinstancecommit',
that all call
'callfunction' => 'watchlist_record_changes',
So if there was another cron task that ends up saving/committing a change to either a block / artefact / view then it would insert rows into the watchlist_queue to be processed. That could explain why it is happening regularly in the small hours of the morning.
To see if that is the case you could do the following:
In htdocs/lib/activity.php add a line inside the function watchlist_record_changes($event) { ... }
`error_log(print_r($event, true));`
to see if that function is being called in the small hours
Hopefully you will see output in your error log if that function is called and where in the cron sequence it was called.
Please let me know if that is the case or not
Cheers
Robert
