75422[BUGFIX] Make sure social media images gets processed if needed
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Sascha Egerer +1
- Oliver Hader +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Sascha Egerer +1
- Oliver Hader +1
- core-ci +1 CI
Issues 1
Files 2
Review log 5366
Show 3441 earlier messages
-
Kevin Appelt uploaded patch set 1 08/12/22, 08:03
-
core-ci voted on patch set 1 V +1 08/12/22, 08:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30064
-
Chris Müller commented on patch set 1 CR -1 08/12/22, 08:22
The "Releases:" line is missing. -
Oliver Klee commented on patch set 1 08/12/22, 08:23
MetaTagGenerator.php:171Please add native type declarations for the parameters. -
Kevin Appelt uploaded patch set 2 08/12/22, 08:28
-
Kevin Appelt commented on patch set 2 08/12/22, 08:28
Reply
DoneMetaTagGenerator.php:171ReplyDone -
core-ci voted on patch set 2 V +1 08/12/22, 08:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30067
-
Benni Mack commented on patch set 2 08/12/22, 08:54
Hey Kevin, since this is a regression, could you please explain a bit more in detail what was the problem and how it is solved (in Commit Message and maybe in the new class method)? Thx -
Sascha Egerer commented on patch set 2 CR -1 08/12/22, 09:02
So what is the difference now to the previous behavior? Now we're back to process every image that does not has a cropping defined. So i do not see any benefit of the previous patch, or am i wrong? -
Oliver Klee commented on patch set 2 08/12/22, 09:30
MetaTagGenerator.php:180Please also always use strict checks (===). -
Kevin Appelt uploaded patch set 3 08/16/22, 06:10
-
Kevin Appelt commented on patch set 3 08/16/22, 06:16
Reply
Originally ALL images were processed. Even a perfect 1200x630 image (correct aspect ratio and not too wide) was processed. This is now no longer the case.Reply
Done.MetaTagGenerator.php:180ReplyStrict checks seemed to be the problem in the beginning. I added strict checks now and it seems to work as intended. Please verify carefully! -
Kevin Appelt rebased onto patch set 4 08/16/22, 06:16
-
Stefan Bürk commented on patch set 4 08/16/22, 08:00
Cancelled Pipeline run for patchset 3 -
core-ci voted on patch set 4 V -1 08/16/22, 08:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30184
-
Kevin Appelt uploaded patch set 5 08/16/22, 08:25
-
core-ci voted on patch set 5 V +1 08/16/22, 08:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30187
-
Stefan Bürk updated the commit message in patch set 6 08/16/22, 08:33
-
core-ci voted on patch set 6 V +1 08/16/22, 08:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30188
-
Simon Schaufelberger commented on patch set 6 08/16/22, 10:50
MetaTagGenerator.php:178should be removed if they don't add value -
Markus Klein commented on patch set 6 CR +1 08/16/22, 11:00
MetaTagGenerator.php:178ReplyDisagree: If we provide a method description those params shall be present too. They are generated anyway by the IDE, usually. If we have a phpdoc that has nothing but params listing without any additional description, then this is unnecessary. -
Markus Klein commented on patch set 6 08/16/22, 11:01
MetaTagGenerator.php:187what about height and maxHeight? -
Markus Klein voted on patch set 6 CR 0 08/16/22, 11:01
-
Stefan Bürk commented on patch set 6 08/16/22, 11:04
MetaTagGenerator.php:178ReplyCore rule is to remove these, expect a specific param/return type has a valuable explanation (and than all should be added/kept) (if all have native types instead). Having a method description without params/return type is thus okay. -
Kevin Appelt commented on patch set 6 08/16/22, 11:08
MetaTagGenerator.php:178ReplyI would agree with Markus.MetaTagGenerator.php:187ReplyFirstly, there is no maximum defined height in the configuration, we would have to add this. However, the aspect ratio and the maximum width mathematically result in a maximum height. So if the image does not meet the second condition ("is whole image") the first condition with the width takes effect automatically, should the height be too large (greater than 800 px), because then the width is over 2000 px. -
Kevin Appelt commented on patch set 6 08/16/22, 11:10
MetaTagGenerator.php:178ReplySorry, did not saw your comment Stefan. If this is the rule, I remove the params from the phpdoc. -
Kevin Appelt uploaded patch set 7 08/16/22, 11:16
-
Kevin Appelt commented on patch set 7 08/16/22, 11:16
MetaTagGenerator.php:178ReplyDone -
Stefan Bürk commented on patch set 7 08/16/22, 11:19
MetaTagGenerator.php:178ReplyYou pushed not using the last patchset. I edited the commit message, which is flattered again in gerrit (overriden). -
core-ci voted on patch set 7 V +1 08/16/22, 11:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30197
-
Annett Jähnichen commented on patch set 7 V +1 08/16/22, 12:36
Tested in main branch and version 11.5.14 with patch. -
Simon Schaufelberger updated the commit message in patch set 8 08/16/22, 13:28
-
Simon Schaufelberger commented on patch set 8 08/16/22, 13:29
restored the cleaned up commit message -
core-ci voted on patch set 8 V +1 08/16/22, 13:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30203
-
Annett Jähnichen voted on patch set 8 V +1 08/16/22, 14:07
-
Simon Schaufelberger voted on patch set 8 CR +1 08/16/22, 14:57
-
Sascha Egerer commented on patch set 8 CR -1 08/17/22, 09:32
MetaTagGenerator.php:187ReplyBut the hight is not taken into account if no cropping is done. So an Image with 1000x99999 will still not be processed anymore. -
Oliver Hader commented on patch set 8 08/18/22, 14:23
MetaTagGenerator.php:187ReplyFrom my point of view resizing shall be applied with the given aspect ratio in case an image dimension exceeds the given bounding box (which is 2000x1050 - height calculated by defined aspect ratio in configuration). -
Kevin Appelt commented on patch set 8 08/19/22, 15:07
MetaTagGenerator.php:187ReplyThe image would still be processed. Because the image does not correspond to the aspect ratio of 1200:630. This means that cropping takes effect (active selection is possible, but not necessary!). Due to the (image) width of 1000 pixels, the height is thus 525 pixels. It is therefore still not necessary to define a fixed maximum height, as this results mathematically. -
Oliver Hader uploaded patch set 9 08/22/22, 12:31
-
Oliver Hader uploaded patch set 10 08/22/22, 12:37
-
Oliver Hader commented on patch set 10 V +1 CR +1 08/22/22, 12:39
Looks good to me. Additional tests assert the corresponding behavior and when files shall be processed. @SaschaEgerer: Could you please have a look? I'd like to release this soonish... -
core-ci voted on patch set 9 V -1 08/22/22, 12:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30346
-
core-ci voted on patch set 10 V -1 08/22/22, 12:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30347
-
Oliver Hader uploaded patch set 11 08/22/22, 12:59
-
Oliver Hader commented on patch set 11 V +1 CR +1 08/22/22, 13:00
Made PhpStan happy... -
core-ci voted on patch set 11 V +1 08/22/22, 13:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30350
-
Simon Schaufelberger wrote 08/22/22, 13:11
Removed reviewer Simon Schaufelberger. -
Sascha Egerer commented on patch set 11 V +1 CR +1 08/22/22, 13:42
OK, i was not aware that the CropVariant is build up automatically with all this data so it can be used like that. Looks good now (as far as the file relation contains the correct crop information)! -
Oliver Hader commented on patch set 11 08/22/22, 13:48
Reply
Yes, I also did not know that... but with reproducing the behavior of `ImageManipulationElement` in a functional test, it can be reproduced. When data is provided to `DataHandler` directly (without invoking the view via `FormEngine`) the behavior is different - but that's the case already without these changes in ext:seo. -
Sascha Egerer commented on patch set 11 V 0 08/22/22, 13:49
Ok.. I'll still break for file relations that have been created in older TYPO3 versions as those do not contain the "social" crop in the file relation. As far as i can see there have been no upgrade that ensures that these crop area is set for older databases. It was introduced in https://github.com/TYPO3/typo3/commit/e1ffbaab4fb1d3363869bc2fc7d492fa3528833c -
Oliver Hader commented on patch set 11 08/22/22, 13:52
Reply
That was introduced for TYPO3 v9.5.1... -
Oliver Hader uploaded patch set 12 08/22/22, 14:37
-
Oliver Hader uploaded patch set 13 08/22/22, 14:41
-
core-ci voted on patch set 13 V +1 08/22/22, 14:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30352
-
Oliver Hader commented on patch set 13 08/22/22, 14:49
MetaTagGenerator.php:187ReplyDone -
Sascha Egerer commented on patch set 13 08/22/22, 14:50
MetaTagGeneratorTest.php:170Would be better readable if we do not negate but switch the arguments. But i think it would be even better if we do not do it as inline condition but put it around the code above so cropVariantCollection is never created if emptyCrop = true -
core-ci voted on patch set 12 V +1 08/22/22, 14:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30351
-
Oliver Hader uploaded patch set 14 08/22/22, 14:54
-
Oliver Hader commented on patch set 14 08/22/22, 14:55
MetaTagGeneratorTest.php:170ReplyDone -
Sascha Egerer voted on patch set 14 V +1 CR +1 08/22/22, 15:00
-
core-ci voted on patch set 14 V +1 08/22/22, 15:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30353
-
Oliver Hader voted on patch set 14 V +1 CR +1 08/22/22, 15:20
-
Benjamin Franzke commented on patch set 14 V +1 CR +1 08/22/22, 17:57
Unresolved
This sentence is quite hard (for me) to understand. I actually had to read the code to understand what the fix/bug/wrong-negation was. So I summarise it here for others: Cropping was applied only if the image was both, cropped in width and in height, cropping was not applied if only one, width or height dimension was cropped. Other than that the patch is CR+1 by me. -
Benjamin Franzke voted on patch set 14 V +2 CR +2 08/22/22, 18:01
-
Benjamin Franzke merged patch set 15 08/22/22, 18:01