Warning: filesize(): stat failed for s3://museum/new_images/89755.jpg in Drupal\Core\Image\Image->__construct() (line 54 of core/lib/Drupal/Core/Image/Image.php).
Drupal\Core\Image\Image->__construct(Object, 's3://museum/new_images/89755.jpg') (Line: 85)
Drupal\Core\Image\ImageFactory->get('s3://museum/new_images/89755.jpg') (Line: 280)
Drupal\image\Entity\ImageStyle->createDerivative('s3://museum/new_images/89755.jpg', 's3://styles/thumbnail/s3/museum/new_images/89755.jpg') (Line: 118)
Drupal\s3fs\Controller\S3fsImageStyleDownloadController->deliver(Object, 's3', Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 666)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comments
Comment #2
dawehnerI'm really not 100% sure that this is the right fix.
Comment #3
cmlaraIt appears as the same functioning code except for
clearstatcache(TRUE, $uri);was committed as part of the fix for #2915322: Image styles: Error generating image, missing source file..It is unclear if the code was pulled from this issue to resolve or if it was written independently.
No root issue appeared to be discovered for why information was not in the cache to begin with.
Only remaining question would be is the clearstatcache() call still be needed. On quick glance I do not believe it should as the file should not change in the middle of operations and the cache should be fine once populated.
Setting as Needs work while that line is considered to be sure we do not have a negative impact without it.
Comment #4
cmlaraSetting to fixed. I haven't seen this cause any issues without
clearstatcache()