Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to regenerate remote asset thumbnails #2463

Closed
leigeber opened this issue Feb 21, 2018 · 3 comments
Closed

Unable to regenerate remote asset thumbnails #2463

leigeber opened this issue Feb 21, 2018 · 3 comments
Assignees

Comments

@leigeber
Copy link

leigeber commented Feb 21, 2018

Description

After cached thumbnails are removed from the filesystem Craft is unable to regenerate them due to an error being thrown when unlinking non-existent source files. My volumes are all Amazon S3 so I'm thinking this tracks back to it wrongly trying to work with the local filesystem.

If I suppress errors from the unlink call at https://github.com/yiisoft/yii2/blob/22832b7c49602ac99aa2296905aef1c074d89bd5/framework/helpers/BaseFileHelper.php#L407 then the thumbnails generate as expected.

2018-02-20 21:16:43 [10.0.1.1][9][-][warning][craft\services\AssetTransforms::getLocalImageSource] Unable to delete the file "/home/vagrant/app/cms/storage/runtime/assets/sources/1498.jpg".
2018-02-20 21:16:43 [10.0.1.1][9][-][error][craft\errors\VolumeObjectNotFoundException] craft\errors\VolumeObjectNotFoundException: The file "File-1.jpg" does not exist, in /home/vagrant/app/cms/vendor/craftcms/cms/src/services/AssetTransforms.php:851
Stack trace:
#0 /home/vagrant/app/cms/vendor/craftcms/cms/src/services/Assets.php(702): craft\services\AssetTransforms->getLocalImageSource(Object(craft\elements\Asset))
#1 /home/vagrant/app/cms/vendor/craftcms/cms/src/services/Assets.php(629): craft\services\Assets->getThumbPath(Object(craft\elements\Asset), 60, 60, true, true)
#2 /home/vagrant/app/cms/vendor/craftcms/cms/src/controllers/AssetsController.php(825): craft\services\Assets->getThumbUrl(Object(craft\elements\Asset), 60, 60, true)
#3 [internal function]: craft\controllers\AssetsController->actionGenerateThumb('13e82a54-fa1b-4...', 60, 60)
#4 /home/vagrant/app/cms/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#5 /home/vagrant/app/cms/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#6 /home/vagrant/app/cms/vendor/craftcms/cms/src/web/Controller.php(74): yii\base\Controller->runAction('generate-thumb', Array)
#7 /home/vagrant/app/cms/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('generate-thumb', Array)
#8 /home/vagrant/app/cms/vendor/craftcms/cms/src/web/Application.php(224): yii\base\Module->runAction('assets/generate...', Array)
#9 /home/vagrant/app/cms/vendor/craftcms/cms/src/web/Application.php(432): craft\web\Application->runAction('assets/generate...', Array)
#10 /home/vagrant/app/cms/vendor/craftcms/cms/src/web/Application.php(208): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#11 /home/vagrant/app/cms/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#12 /home/vagrant/app/public/cms.php(15): yii\base\Application->run()
#13 {main}

Additional info

  • Craft version: 3.0.0-RC11
  • PHP version: 7.2
  • Database driver & version: PostgreSQL
  • Plugins & versions: aws-s3 1.0.8
@brandonkelly
Copy link
Member

Yikes, thanks for pointing that out. Fixed now, and we’ll get a new release out today.

@GuidoNeele
Copy link

Same issue when deleting assets https://craftcms.stackexchange.com/questions/23943/craft-3-rc-11-deleting-assets-issue/23945#23945

brandonkelly added a commit that referenced this issue Feb 21, 2018
I have absolutely no idea what I was thinking in 30db5af
@brandonkelly
Copy link
Member

Looking at this with fresh eyes, I think I must have been sleep-typing earlier. The “fix” in 30db5af doesn’t actually fix anything at all, and I don’t think I had a grasp of what the actual bug was. ¯_(ツ)_/¯

Fixed for real now though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants