Subscribers to a journal are receiving renewal emails saying that their subscription is about to expire even though in their subscription details it says that their subscription is uptodate and good until 2020
subscriber profile:
email received:
Your XXXXX subscription is about to
expire.
CANADA - Individual (1 year print and electronic) - 1 year - 100.00 CAD
Expiry date: 2019-01-31
To ensure the continuity of your access to this journal, please go to the
journal website and renew your subscription:
I might have to wait a year to find out if this fixes it, but I made these changes to classes/tasks/SubscriptionExpiryReminder.inc.php – they make sense to me but there may be some deeper reason. Changes marked with “//##”:
// If it is the first day of a month but previous month had only
// 30 days then simulate 31st day for expiry dates that end on
// that day.
//##
//$shortMonths = array(2,4,6,8,10,12);
$shortMonths = array(2,4,6,9,11);
if (($todayDate['day'] == 1) && in_array(($todayDate['month'] - 1), $shortMonths)) {
$curDate['day'] = 31;
$curDate['month'] = $todayDate['month'] - 1;
//##
if ($curDate['month'] == 0) $curDate['month'] = 12;
if ($curDate['month'] == 12) {
$curDate['year'] = $todayDate['year'] - 1;
} else {
$curDate['year'] = $todayDate['year'];
}
$journals = $journalDao->getAll(true);
while ($journal = $journals->next()) {
// Send reminders for simulated 31st day of short month
$this->sendJournalReminders($journal, $curDate);
}
}
Sorry for the late response – but would you be willing to submit these as a pull request to the OJS github repository? I can review them for inclusion there.
Thanks,
Alec Smecher
Public Knowledge Project Team