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
18 December 2025, 5:17
Sorry for my late reply again Robert.
I have not had a chance to add anything to htdocs/lib/activity.php to see if a function is being called.
However I did notice today that when viewing a page the page views updated? Then this triggered a email notification.
I made no changes to this page, Just viewed it and I recieved an email.
So this must be causing the mass number of emails to be sent.
Any idea how to stop this?
Thanks,
Michael
18 December 2025, 9:55
Hi Michael,
Thank you for your reply.
I'm wondering if it's a certain blocktype that is causing this problem
Are you able to tell me what blocks are used on the page?
You can find this out by inspecting the source of the page and finding all the classes starting with 'bt-'
They should be things like 'bt-image' for image block, 'bt-text' for text block, etc.
Hopefully that will help me diagnose the problem where just viewing the block is causing the system to think the block has been updated.
Cheers
Robert
