View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017330 | phpList 3 application | public | 26-08-14 14:30 | 08-10-14 11:00 | |
Reporter | FineCutBodies | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.0.7 | ||||
Target Version | Fixed in Version | 3.0.9 | |||
Summary | 0017330: Welcome to the list messages aren't sent | ||||
Description | I didn't understand why my welcome messages aren't arriving only occasionally while testing the functionality of my site with 2-3 email addresses, subscribing and deleting them afterwards... When i was trying to debug where they are lost, I found that confirmation emails won't be sent out until "$_SESSION['subscriberConfirmed']" is set. It's set when the user clicks confirmation link in his browser: - "index.php" >> function confirmPage($id) there is: "$_SESSION['subscriberConfirmed'] = time();" When after a confirmation of a subscription, I try to subscribe another email of mine and I do it not by subscription page, but sending subscription data by POST the "index.php" will call "subscribelib2.php" what returns with 2 (no need to show subscribe page) so it won't call the function SubscribePage($id) what would unset "$_SESSION['subscriberConfirmed']", so it stays set and when i click the new subscription email's confirmation link, it won't send out the "welcome message": Index.php - line 257: case "subscribe": $success = require 'admin/subscribelib2.php'; if ($success != 2) { print SubscribePage($id); } break; - "index.php" >> function subscribePage($id) there is: "unset($_SESSION['subscriberConfirmed']);" ------------------------ Sorry if it's a false alarm, i'm pretty new to PHP and PHPList so maybe i'm wrong, but my patch just solved my problem :) | ||||
Tags | No tags attached. | ||||
|
The idea of flagging in the session that the welcome email has been sent is to avoid sending it twice on for example a page-reload. I'm not entirely sure what situation you are in to not want that, but it seems like a non-common situation (eg you adding multiple addresses). In general a subscriber will only do this once, in which case it's fine as it is. Unless you come with a compelling argument to change that behaviour, I'd be inclined to not action this issue. |
|
Unless you want to handle these two subscription types differently, it's ok, but I have a feeling they both should clear the flag, so seems an unintended mistake, what could be easily corrected: 1, display subscribe form because no data was provided in the address bar 2, all data was POST-ed, subscription was made so the return value for $success==2 (no need to show subscribe form) In the second version "SubscribePage($id)" won't be called, so the flag won't be deleted (unset is in that function).... ------------ Index.php - line 257: case "subscribe": $success = require 'admin/subscribelib2.php'; if ($success != 2) { print SubscribePage($id); } break; |
|
thanks that was very helpful. Keep them coming FineCutBodies :-) |