You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with TYPO3 11.5.19 and vhs 6.1.2 i determined that if you crop your image with the TYPO3 cropping editor, the image generated with v:media.image is not cropped. Always the original image.
That is because in file /Classes/ViewHelpers/Media/Image/AbstractImageViewHelper.php at line 147 the class in the condition is wrong.
Original line:
if (is_object($src) && $src instanceof FileReference) {
You have to change the class to:
if (is_object($src) && $src instanceof \TYPO3\CMS\Core\Resource\FileReference) {
Because FileReference is defined as TYPO3\CMS\Extbase\Domain\Model\FileReference; in line 18.
And that is not true.
See also that _getProperty (with underscrore) leads into following error: Call to undefined method TYPO3\CMS\Core\Resource\FileReference::_getProperty()
Without underscore it works.
The text was updated successfully, but these errors were encountered:
Hi,
with TYPO3 11.5.19 and vhs 6.1.2 i determined that if you crop your image with the TYPO3 cropping editor, the image generated with
v:media.image
is not cropped. Always the original image.That is because in file /Classes/ViewHelpers/Media/Image/AbstractImageViewHelper.php at line 147 the class in the condition is wrong.
Original line:
if (is_object($src) && $src instanceof FileReference) {
You have to change the class to:
if (is_object($src) && $src instanceof \TYPO3\CMS\Core\Resource\FileReference) {
Because
FileReference
is defined asTYPO3\CMS\Extbase\Domain\Model\FileReference;
in line 18.And that is not true.
The second change is after that.
Original line:
$crop = (is_object($src) && $src instanceof FileReference) ? $src->_getProperty('crop') : null;
New line:
$crop = (is_object($src) && $src instanceof \TYPO3\CMS\Core\Resource\FileReference) ? $src->getProperty('crop') : null;
See also that
_getProperty
(with underscrore) leads into following error:Call to undefined method TYPO3\CMS\Core\Resource\FileReference::_getProperty()
Without underscore it works.
The text was updated successfully, but these errors were encountered: