Commit Graph

21722 Commits

Author SHA1 Message Date
John Oleksowicz
ecd7614337 Add defaults for unset env variables
These defaults maintain backwards compatibility if developers don't
change anything

MAILPOET-4237
2024-02-08 11:13:35 -06:00
John Oleksowicz
a78a31f110 Fix indentation
MAILPOET-4237
2024-02-08 11:13:35 -06:00
John Oleksowicz
fcc4be330c Add set -e to hook scripts to exit on fail
MAILPOET-4237
2024-02-08 11:13:35 -06:00
John Oleksowicz
52397951d8 Rename scripts and make messages consistent
MAILPOET-4237
2024-02-08 11:13:35 -06:00
John Oleksowicz
97f811390d Make install js/php commands optional
MAILPOET-4237
2024-02-08 11:13:35 -06:00
John Oleksowicz
7b64c47733 Don't run any git hooks unless env variable is set
MAILPOET-4237
2024-02-08 11:13:35 -06:00
John Oleksowicz
bc4014d4a3 Make lint-staged commands configurable
MAILPOET-4237
2024-02-08 11:13:35 -06:00
John Oleksowicz
ec6d26162b Add hooks to install updates automatically
MAILPOET-4237
2024-02-08 11:13:35 -06:00
John Oleksowicz
5d8d7adc08 Add command to install just PHP dependencies
MAILPOET-4237
2024-02-08 11:13:35 -06:00
dependabot[bot]
15b351b3f1 Bump follow-redirects from 1.15.2 to 1.15.4
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-08 12:15:20 +01:00
Jan Lysý
d4d4db7cc5 Release 4.43.0 2024-02-06 14:47:57 +01:00
Rostislav Wolny
c2c9429706 Fix TransactionalEmailHooksTest failing on MySQL 8
[MAILPOET-5886]
2024-02-05 15:24:26 +01:00
Rostislav Wolny
de9c03a3bc Add migration for fixing status for newsletters stuck as sending
[MAILPOET-5886]
2024-02-05 15:24:26 +01:00
Rostislav Wolny
7b86de1346 Set sentAt date when saving newsletter stats
MySQL 8 can't handle null values for not null columns even when we set a default
See detailed explanation
https://kedar.nitty-witty.com/blog/mysql-8-timestamp-cannot-be-null-and-explicit_defaults_for_timestamp
[MAILPOET-5886]
2024-02-05 15:24:26 +01:00
Rostislav Wolny
749c4e5e43 Prevent deleting and further changes in detached tasks during sending
When a post notification history is deleted in
MailPoet\Cron\Workers\SendingQueue\Tasks\Newsletter::preProcessNewsletter
it is also detached from EntityManager.

Any further attempt to manipulate the entity via EntityManager (remove or flush) causes
errors like "ERROR: A new entity was found through the relationship 'MailPoet\Entities\ScheduledTaskEntity#sendingQueue'"

In this commit we prevent doing such changes.
[MAILPOET-5880]
2024-02-05 15:16:11 +01:00
Rostislav Wolny
6a86dfc7c0 Throw an exception when preprocessing a newsletter without a queue
The goal of this commit is to change the preProcessNewsletter method
to return false only in case when it deleted the newsletter and
all associated entities. So that we know for sure that false means all was deleted.
[MAILPOET-5880]
2024-02-05 15:16:11 +01:00
Jan Jakes
ac6cc881d1 Fix error when permanently deleting a legacy automation
[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
Jan Jakes
7bfcf4bd67 Move redirect to useEffect
[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
Jan Jakes
f24184fe16 Add automation name also to URL-based notices
[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
Jan Jakes
6994afebb7 Remove unused URL-based notices
[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
Jan Jakes
bf8e0f344a Unify automation listing notices, include automation name
[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
Jan Jakes
f4157947c4 Fix and improve automation listing table footer and pagination styles
[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
Jan Jakes
2665ca65ae Use real number of automations for table placeholder
[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
Jan Jakes
bf70c24511 Remove no longer needed welcome email setup code
[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
Jan Jakes
e3a194a1dd Remove no longer needed notices (it redirects to automations)
[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
Jan Jakes
c388c2ae9b Fix not waiting until a template is saved (and causing error in FF)
[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
Jan Jakes
646d8dbea4 Fix updating legacy automation status on trash, restore, and delete
[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
Jan Jakes
4b3744717f Revert "Unify responses of newsletter editing API methods with get()"
This reverts commit e0b6cf7b41.

In the next commit, I will add a different fix for this issue.

[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
alex-mpoet
5824905f18 Independently update existing subscribers info and status in import
[MAILPOET-5617]
2024-02-05 12:54:02 +01:00
Brezo Cordero
de1fc6601c Always display small sender notices
in the places where we always rewrite the emails (Automations).

[MAILPOET-5844]
2024-02-05 10:52:56 +01:00
Brezo Cordero
d65fdd7a6d Reset currentRecords only when needed
And reloadCache after domain verification.

[MAILPOET-5844]
2024-02-05 10:52:56 +01:00
Brezo Cordero
928c100839 Rename constant
[MAILPOET-5844]
2024-02-05 10:52:56 +01:00
Brezo Cordero
1e373ab7e0 Update Sender Domain inline notice
Remove unused notices displayed before enforcement date.

[MAILPOET-5844]
2024-02-05 10:52:56 +01:00
Brezo Cordero
01afa2ef31 Update Sender Domain page banners
Remove unused notices displayed before enforcement date.

[MAILPOET-5844]
2024-02-05 10:52:56 +01:00
Brezo Cordero
3f8c0f2bc6 Remove restrictionsApply function
[MAILPOET-5844]
2024-02-05 10:52:56 +01:00
David Remer
bd75f74cb5 Remove Enable Automations notice
[MAILPOET-5883]
2024-02-05 08:56:34 +02:00
David Remer
41dff5f95a Move tabConfig so translations work
[MAILPOET-5852]
2024-02-02 13:16:44 +01:00
David Remer
b3bd371a27 Make domain authentication notices translateable
[MAILPOET-5852]
2024-02-02 13:16:44 +01:00
David Remer
f09ddaff1e Disable how-to instructions under the FormTokenField
These strings are not translateable for us at the moment. Therefore I disabled them

[MAILPOET-5852]
2024-02-02 13:16:44 +01:00
David Remer
4a96f3dfea Make shortcode text translateable
[MAILPOET-5852]
2024-02-02 13:16:44 +01:00
Jan Jakes
bc7fbd2469 Extract shared detachAll/refreshAll logic to a method
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
8450e1bb1b Clear entity manager for every cron run
This avoids using stale data and prevents memory leaks.

[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
2b5135474e Save deleted newsletter in woocommerce purchase stats as NULL
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
877c736190 Add a missing detachAll() helper to a batch delete
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
a947dd36cd Use refreshAll() helper for batch updates
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
d6da2af55b Extract newsletter bulk delete logic to a controller
Repositories shouldn't inject other repositories. Also, this solves circular DI dependency.

[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
82d5621caf Extract newsletter entity deletion to a method
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
cb803d6f4b Use epxlicit transaction demarcation
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
082ab78f90 Remove no longer needed cleanup
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
d1f48b6772 Detach deleted newsletters, simplify code
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00