lochmueller / focuspoint

🌅 Smartest TYPO3 Crop Tool ever 🌅
http://typo3.org/extensions/repository/view/focuspoint
22 stars 23 forks source link

Uncaught TYPO3 Exception: getCroppedImageSrcByFile #60

Closed IvayloIvanov closed 5 years ago

IvayloIvanov commented 6 years ago

Hi,

after clearing all the caches from the backend I receive this error:

Argument 1 passed to HDNET\Focuspoint\Service\FocusCropService::getCroppedImageSrcByFile() must implement interface TYPO3\CMS\Core\Resource\FileInterface, instance of TYPO3\CMS\Core\Resource\Folder given, called in /var/www/vagrant/htdocs/typo3conf/ext/focuspoint/Classes/Service/FocusCropService.php on line 86

TYPO3: 8.7.10 EXT focuspoint: 3.0.3 EXT autoloader: 5.0.1 PHP 7

When I call the page a second time the error disappears and the page is loaded. Somehow the focuspoint is called before the images within the processed folder are generated. After debugging the function /ext/focuspoint/Classes/Service/FocusCropService.php:86 $file = $this->getViewHelperImage($src, $image, $treatIdAsReference); return $this->getCroppedImageSrcByFile($file, $ratio);

$file returns an folder instead the images.

Any ideas?

Thank you! Regards, Ivaylo

lochmueller commented 6 years ago

Hey @IvayloIvanov Du you check the "$src" in this case. It is a real file or perhaps only a folder path? Perhaps the "getViewHelperImage" have some errors? Regards, Tim

lochmueller commented 5 years ago

No feedback. I will close this issue...