Commit Graph

114 Commits

Author SHA1 Message Date
577a82ca49 Add bulk action for removing tag from subscribers
[MAILPOET-5454]
2023-07-13 13:12:56 +02:00
aa12fd57d7 Add bulk action for tagging subscribers
[MAILPOET-5454]
2023-07-13 13:12:56 +02:00
64a92c259d Add clarifying comment
MAILPOET-5404
2023-07-12 15:48:03 +02:00
fc410c2154 Make sure lastProcessedSubscriberId is always correct
MAILPOET-5404
2023-07-12 15:48:03 +02:00
25cbba1246 Use order by id for query
MAILPOET-5404
2023-07-12 15:48:03 +02:00
73eae47a39 Add cron worker for backfilling engagement data
MAILPOET-5404
2023-07-12 15:48:03 +02:00
8bf3eddf09 Return cached item for homepage stats
MAILPOET-5439
2023-07-10 11:04:33 +02:00
b22217420f Track last sending at
MAILPOET-4998
2023-06-22 15:29:22 +02:00
0e9b96d0b7 Track opens, clicks, purchases, and page views
MAILPOET-4998
2023-06-22 15:29:22 +02:00
798bc320ed Make sure the doctrine parameters are unique
Previously there was a mismatch between parameters coming from the
dynamic segment and the parameters coming from the export
controller.

[MAILPOET-5382]
2023-06-16 17:00:33 +02:00
0d3293be52 Remove Subscribers\Source::setSource()
I found this method in the context of a ticket to refactor Paris code to
Doctrine. As far as I can tell, it is not used anymore and it is
safe to delete it.

It was added in 1af5802 and was used only inside
Models\Subscriber::subscribe(). Then subscribe() was moved to
Subscriber\SubscriberActions in 7528f0f. Finally, commit 7db2384
refactored SubscriberActions removing the only two calls to
Source::setSource().

The test class SourceTest is removed as well as its only purpose was to
test Source::setSource().

[MAILPOET-5345]
2023-06-01 12:06:14 +02:00
5203eb5268 Don't cache if subscribers count is below minimum value
[MAILPOET-5180]
2023-05-22 14:13:05 +02:00
4cd1667146 Cache homepage subscribers stats
[MAILPOET-5180]
2023-05-22 14:13:05 +02:00
00d021109c Move ModelValidator::validateNonRoleEmail() to a new Validator class
We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor.

This commit moves the method ModelValidator::validateNonRoleEmail() to a
new Validator class as the method is not used by the validator system of
the Paris models. ModelValidator::validateEmail() was also moved as it
is called by ModelValidator::validateNonRoleEmail().

[MAILPOET-4343]
2023-05-17 12:37:22 +02:00
d760272678 Remove ModelValidator::validateIPAddress()
We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor. As a first step, this commit removes the method
ModelValidator::validateIPAddress(). It was unused in a single place and
it was replaced with a direct call to the builtin PHP way to validate an
IP address.

[MAILPOET-4343]
2023-05-17 12:37:22 +02:00
150042f670 Disable overriding custom fields on repeated subscribing
[MAILPOET-5246]
2023-05-03 11:31:24 +02:00
41abed3b15 Add custom field to subscriber's relation when it is created
[MAILPOET-5246]
2023-05-03 11:31:24 +02:00
5a85390655 Replace remaining calls to utf8_encode() with mb_convert_encoding()
In the previous commit, I removed all calls to the deprecated
utf8_encode() that seemed safe to remove. In this commit, I'm replacing
the calls to this function that I'm not sure if are same to remove or
not with mb_convert_encoding().

mb_convert_encoding() requires the extension mbstring to be enabled. It
should be enabled on most PHP install but not all. We are already using
mbstring functions in our code base and we provide a polyfill for PHP
installs where the extension is not enabled
(62bb75ed91/mailpoet/prefixer/composer.json (L25)).
So it should be safe to use it.

[MAILPOET-4865]
2023-04-28 10:26:03 +02:00
2b83c8c69f Fix previously sanitized link
[MAILPOET-5254]
2023-04-21 11:14:25 +02:00
6f0307be95 Flush database changes before invoking "mailpoet_segment_subscribed" hook
This is to ensure the hook consumers can read up-to-date data from the database.

[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
6c03702fbd Fix test failure that was occurring for multisite
A previous test must have sent a confirmation email to a subscriber with
 the same ID.

 This didn't seem worth adding to the cleanup extension since it was
 only causing a single failure.

MAILPOET-5145
2023-04-07 20:17:05 -05:00
f9d6e65ece Ensure personal data exporter includes all custom fields
The test testExportSubscriberWithCustomField was only passing before
because we were truncating tables in between tests, so the custom field
id ended up matching the subscriber custom field id coincidentally.

MAILPOET-5145
MAILPOET-5185
2023-04-07 12:11:12 -05:00
ef3c64b85d Adjust use Html2Text from MailPoetVendor namespace
[MAILPOET-5128]
2023-03-15 15:02:32 -03:00
da3ec8c9a8 Fix getting max subscriber id
[MAILPOET-5084]
2023-02-27 09:37:43 +01:00
ee007e9392 Refactor fetching subscribers stats data
In the original approach we completely ignored subscribers who subscribed and unsubscribed
within the last 30 days.
Based on the feedback from QA this was quite confusing.
This commit changes the logic and instead of looking at current status we fetch the counts
based on logs (the lastSubscribedAt column and statistics_unsubscribes table) and we ignore the current status.
On the list level we don't have any logs so we still need to check the current status on the list level,
but newly we ignore the global status.
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
9e157da66d Improve list level unsubscribe stats
We want to show admin how many subscribers subscribed to a list and how many
unsubscribed within last 30 days so that they see the change.
If someone subscribed and also unsubscribed within those 30 days we skip him.
We don't have data to detect they were really subscribed at some point.
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
e3897fa04e Improve global unsubscribes stats on homepage
Before this fix if a subscriber subscribed multiple times
we counted them a multiple global unsubscribes
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
04307ca2a6 Compute change of global subscribed subscribers
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
076f79358e Add engagement score to the homepage subscribers stats
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
1727163640 Add fetching of list level subscriber changes to homepage data service
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
ab35f5c8c1 Add fetching of global subscribers stats to Homepage data controller
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
b24b7b86fd Update homepage link in default settings for confirmation email
[MAILPOET-4936]
2023-01-30 14:39:35 +01:00
1a7b7d1936 Escape segment name for usage in html select
[MAILPOET-4942]
2023-01-16 13:59:30 +01:00
f11aca925f Do not attempt to send a confirmation email when sending is paused
When sending is paused due to some MSS configuration error the confirmation
email error may cause that the important error from MSS gets overwritten
event reset in case the mail is accidentally sent.
[MAILPOET-4940]
2023-01-09 20:01:47 +01:00
b3691a4625 Detach invalid entity
[MAILPOET-4104]
2023-01-09 15:23:48 +01:00
68db0dbefe Don't process soft sending errors via MailerLog in confirmation mailer
Soft errors are usually related to the particular email address. We don't want to
pause sending due soft errors.
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
e015302a94 Update the confirmation email error message
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
20fcf23f8f Add processing of sending errors to the confirmation mailer
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
5a53406d33 Show error in form if confirmation email fails
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
ee83e4d748 Refactor SubscriberActions:subscribe to return status of confirmation email
We need to pass the error or success info about the confirmation email
in order to be able to be able to display the error message.
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
ea4637c740 Add the possibility to skip hooks when subscribing to segments
[PREMIUM-214]
2022-12-19 12:04:28 +01:00
669367c9c6 Update texts and fix editor saving template with missing activation link
MAILPOET-4649
2022-12-15 18:15:01 +01:00
77d62c431a Fix coding style issues
MAILPOET-4649
2022-12-15 18:15:01 +01:00
4a5fc507ca Add tests for ConfirmationEmailCustomizer
MAILPOET-4649
2022-12-15 18:15:01 +01:00
210c240aab Update ConfirmationEmailMailer to support custom confirmation email created with the email editor from template
Setup confirmation email customizer in ConfirmationEmailMailer and trigger confirmation email template creation when visual subscription confirmation emails is enabled from settings

MAILPOET-4649
2022-12-15 18:15:01 +01:00
d19f5dc732 Add ConfirmationEmailCustomizer class and confirmation email template
MAILPOET-4649
2022-12-15 18:15:01 +01:00
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
c67c58709b Unify spacing of declare statements
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
4832771185 Refactor the captcha system
The current Captcha class has a lot of responsibilities. It renders the captcha
image, can check if a certain captcha type is a Google captcha, if a captcha is
required for a certain email. The SubscriberSubscribeController is not only in
charge of "controlling" the subscription process but also validates, whether a
captcha is correct or not. This architecture made it difficult to extend the
functionality and introduce the audio captcha feature.

Therefore this commit refactors the captcha architecture and tries to seperate
the different concerns into several classes and objects. Validation is now done
by validators.

The CaptchaPhrase now is in charge of keeping the captcha phrase consistent
between the image and the new audio, so that you can renew the captcha and both
captchas are in sync.

[MAILPOET-4514]
2022-11-24 09:20:39 +01:00
725e0ecb00 Remove automation feature flag
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00