-
-
Notifications
You must be signed in to change notification settings - Fork 213
3.5.30 Differences in newsletter subscriptions according to member deactivation method #8812
Comments
|
Is the newsletter sent to the deactivated members? |
|
Yes, when the deactivation checkbox is off but the current date is past the tl_member->stop value. |
|
The reason it works when deactivating a member is found at the end of core/dca/tl_member.php. The toggleVisibility() hooks into the newsletter recipient table. As a result, a member that is not yet active but will be activated in the future (e.g. new employee) should also receive newsletters associated to that member. |
I don't think so. You are not allowed to send newsletters to anyone before they have completed the double opt-in process.
What exactly do you mean? Shouldn't the newsletter script check for disabled members upon sending instead? |
This would work but would be inconsistent with the checkbox method of disabling an account. When the checkbox is ticked the corresponding email address in the newsletter gets deactivated (the "unpublished" icon). However, when an account runs past its stop date it will still appear as active in the newsletter recipient list. Filtering these out at send-time still wouldn't mean that the newsletter list always reflected the active members. Perhaps some sort of daily cronjob task would be a better approach? You could check daily for expired accounts and then turn on the tickbox plus deactivate the corresponding newsletter entry. |
|
@contao/developers How do we solve this best? |
Does this apply to employees as well? How would you violate §7 UWG if you keep it company-internal? Anyway, in theory it is possible for a member to be temporarily suspended (via the date-fields), but still be a valid NL recipient later.
The NL script should check for multiple states:
While a cronjob testing any member for start/stop would work, it might be fatal for large databases. The cronjob could use a mechanism similar to Newsletter::synchronize(). |
If tl_member->stop is indexed on the database, it would run as quickly as any other SQL query. Select the records where the stop date is equal or greater to today's date and update so that tl_member->disable is true and the joined tl_newsletter_recipients->active is false. This could possibly all be done just in SQL. |
|
The Start/Stop-fields are using minute-precision, so a daily job is not enough to do it right. Also, a problem that somehow still exists in Contao 4: The fields are varchar(10) NOT NULL, instead of "int NULL" (where NULL is like the current empty field). This will prevent any Integer-based search. |
|
Honestly i do not like the idea of not being able to send newsletters to members that are no longer active. |
|
Asaage, point taken. A large part of this issue was just the inconsistency between how manual and date-based deactivations affect the newsletter subscriptions. However it is resolved, it would be best for the behaviour to be consistent. Here is a suggestion that might keep everyone happy:
Although some people are using Newsletters as its own separate service, many Contao users are running member services and don't want expired accounts still receiving members-only newsletters by default for obvious reasons, so any solution needs to take this possibility into account. Regarding KaiserCh's point about minute precision, the worst case scenario would just be that someone is removed from the list a day late, in the case of a "greater than now" comparison, but couldn't you run the date check daily as an equals comparison on the date half of the datetime string and remove this problem that way? (Or did you mean the date isnt a string but an int? - sorry I didnt check this before) Point taken that in some situations it's going to tax the database quite heavily, but is checking at send-time better? Those comparisons are going to be need to be done sooner or later to get the desired result, so why not just do them on the expiry day? Doing it at send time means you may have people on your subscription list who appear to be subscribed but will actually get filtered out. You wouldn't be able to export a current list of subscribers without first cross-referencing with the member database. |
I totally understand that but there are similar inconsitencies of this kind with stop-dates: in articles, pages or ce_elements for example - where the un/published-state is not linked with start/stop-dates. At least there should be better documentation in terms of the difference between de/activate, allow-login, start/stop-dates and the subscriptions. |
As discussed in Mumble on September 27th, we have to check if there is a member with the same e-mail-address and check if they are disabled. |
|
Fixed in contao/contao@834e969. |
Deactivating by date and deactivating by checkbox behave differently regarding newsletters, despite appearing like they would do the same thing on the back end.
When a member account is deactivated automatically by date, it still is included on newsletter sends. Deactivating via the checkbox instead removes the email address from all newsletters for as long as the box is checked.
How about this behaviour be made consistent, ideally by using the date range to trigger the checkbox being turned on, or else by copying the same temporary newsletter removal behaviour?
The text was updated successfully, but these errors were encountered: