71714[BUGFIX] Fix rendering of specific format body in FluidEmail
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Jochen Roth +1
-
Verified V +2 Done
- Christian Kuhn +2
- Jochen Roth +1
- core-ci +1 CI
Issues 1
Files 6
- typo3/sysext/core/Classes/Mail/FluidEmail.php5+28 −3
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_fluid_email/Resources/Private/Templates/WithSubject.htmlnew+9 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_fluid_email/Resources/Private/Templates/WithSubject.txtnew+6 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_fluid_email/ext_emconf.phpnew+22 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_fluid_email/ext_localconf.phpnew+7 −0
- typo3/sysext/core/Tests/Functional/Mail/FluidEmailTest.php+85 −0
Review log 910
-
Oli Bartsch uploaded patch set 1 10/14/21, 10:30
-
Mathias Brodala commented on patch set 1 10/14/21, 10:36
-
Oli Bartsch commented on patch set 1 10/14/21, 10:49
FluidEmail.php:150Reply Unresolved> What problem do you see exactly by triggering the rendering? As I wrote in the issue, this is/was actually just a getter method. Devs usually would not expect to trigger any rendering when calling a getter. I'm also pretty sure this method is called in extension code for exactly this purpose => get the current $html content - if set. In case extensions rely on this method to return NULL, in case no rendering was done beforehand, this would be a breaking change. > I'd mostly recommend to split the actual rendering since generateTemplatedBody() currently does too much at once Fully with you, but IMO not part of this patch. -
core-ci voted on patch set 1 V +1 10/14/21, 10:50 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18098
-
Jochen Roth voted on patch set 1 V +1 CR +1 10/14/21, 15:53
-
Guido Schmechel commented on patch set 1 10/24/21, 11:25
FluidEmail.php:178What happens if we pass a wrong format here, such as "text". Do we need to secure this more? Then I would also expect a test. Or e.g. define "txt" as the default for forceFormat? -
Oli Bartsch commented on patch set 1 11/02/21, 09:32
FluidEmail.php:178ReplyWhere do we pass a wrong format? This is a protected method, called with static values only. Anyways, if an invalid format is given, simply no template body is generated. This is done by the "in_array" checks and is also the same behaviour as if $this->format would contain invalid values. -
Guido Schmechel commented on patch set 1 11/02/21, 09:59
FluidEmail.php:178ReplySorry, I had a different passage in mind. Therefore everything fine! -
Christian Kuhn voted on patch set 1 V +2 CR +2 11/03/21, 11:54
-
Christian Kuhn merged patch set 2 11/03/21, 11:55
FluidEmail.php:150