Sunday, 03 November 2024
  8 Replies
  95 Visits
0
Votes
Undo
Hey,
When there are guest subscriptions (user_id = 0) with a weekly email they do not receive an email, because their date is changed together with the daily emails from guest subscription. The check should not be done on 'user_id', because that is not unique.
Better is a check on 'id' or 'email_id'.
I have used the 'email_id'.
See file: site/helper/emailhelper.php

2x correction (identical).
///pch 03-11-'24 user_id = 0 for all guest; that is not unique. Use id
/// $query = "UPDATE `#__jma_subscribers` SET `date` ='"
/// . $today . "' WHERE `user_id` = " . $userdata->user_id . " AND alert_id = " . $userdata->alert_id;
changed into:

$query = "UPDATE `#__jma_subscribers` SET `date` ='"
. $today . "' WHERE email_id = '" . $userdata->email_id . "' AND alert_id = " . $userdata->alert_id;
It works perfectly.

In the attachments, my modified package version 3.0.0, with all my modifications, also mentioned in this help desk.
Essential is that the default state in de database of 'State' is 0 instead 1.
Hope it helps you.