Sulu version 2.1.2
After upgrading from sulu 2.0 to sulu 2.1.2 the media formats suddenly aren't generated anymore. I'm using S3 storage. The image however is correctly uploaded to S3.
I expect the formats to still be generated since i haven't changed any configuration, file permissions or code.
Get a clean install using Sulu skeleton and add de S3 storage configuration following the https://docs.sulu.io/en/2.1/cookbook/external-media-storage.html documentation. Clear the cache and upload an image. The image is uploaded to S3 but no thumbnail formats are created.
Hey, thanks for reporting this! Is it possible that you are running into the problem described in https://github.com/sulu/sulu/issues/5468?
@nnatter Oh, it might be. I'll try to check it out later today. Thanks for your response :)
@nnatter Yes, it did. I downgraded to "league/flysystem-aws-s3-v3": "1.0.24" and had to run bin/console sulu:media:format:cache:clear to have the thumbnails properly generated.
Thanks for the response! I will close this in favour of #5468 then.
@nnatter the change worked for my local environment (as reported a month ago), but somehow not for my production environment.. I have checked the following:
public/uploads/media folder and ran sulu:media:init)cache:clear)bin/console sulu:media:format:cache:clear i get not errorsvar/log/admin/prod.log i see no errorsDo you have any idea about what i could check to fix the issue? :)
Thanks
Are you sure this is the same error then? The flysystem problem should be visible in the log (see https://github.com/sulu/sulu/issues/5468#issuecomment-699877195). Does the error also happen for new images? If yes, I am afraid you will need to debug what line of the code fails in your case.
@nithiz try to clear the whole var/cache folder using rm -rf var/cache as bin/adminconsole cache:clear will only delete the admin cache you would also run the bin/websiteconsole cache:clear to clear that container cache, but to be sure try to remove the whole cache folder.
Also try to clear the opcache on your server mostly this should be done restarting webserver or php-fpm. You can also use tools like this one.
Thanks guys! i'll try to debug it in production later today.
@alexander-schranz @nnatter I finally figured it out. It had nothing to do with my code or cache. It had an nginx directive for caching which didn't have a fallback to index.php. So whenever an image did not exist it would just 404 instead of generating the thumbnail. I now used the nginx "expire" config from https://docs.sulu.io/en/2.1/cookbook/web-server/nginx.html. Everything works as expected now :)
Thanks for the assistance guys!
@nithiz Good to hear that it works now and thank you for the response and information what did go wrong.