RedEyeDevelopment / craft-imager-x-fortrabbit-driver

MIT License
1 stars 2 forks source link

Class missing when generating queued transforms #2

Open meredevelopment opened 3 years ago

meredevelopment commented 3 years ago

I'm trying to get this plugin working with Craft 3.7.11 + Imager X 3.5.2. Besides a dependency issue ( #1 ), I get the following error in the Queue Manager when Queued transforms are generated:

Class 'redeye\imagerxdospacesdriver\externalstorage\FortrabbitStorage

This happens when making use of Imager X 'Automatic Generation' and 'Named Transforms' in config files.

Interestingly the transforms ARE generated, but stored locally and not pushed up to Object Storage.

Here's a screeny of the error visible in Queue Manager: image

Here's the full stack from storage/logs/queue.log:

2021-09-08 09:40:44 [-][1][-][error][craft\queue\QueueLogBehavior::afterError]  [258] Generating transforms for asset "Exacta-rod-1000.jpg" (ID 2) (attempt: 1, pid: 17485) - Error (time: 1.209s): Class 'redeye\imagerxdospacesdriver\externalstorage\FortrabbitStorage' not found
2021-09-08 09:40:44 [-][1][-][error][Error] Error: Class 'redeye\imagerxdospacesdriver\externalstorage\FortrabbitStorage' not found in /var/www/html/vendor/spacecatninja/imager-x/src/services/StorageService.php:56
Stack trace:
#0 /var/www/html/vendor/spacecatninja/imager-x/src/transformers/CraftTransformer.php(107): spacecatninja\imagerx\services\StorageService->store('/var/www/html/w...', true)
#1 /var/www/html/vendor/spacecatninja/imager-x/src/services/ImagerService.php(472): spacecatninja\imagerx\transformers\CraftTransformer->transform(Object(craft\elements\Asset), Array)
#2 /var/www/html/vendor/spacecatninja/imager-x/src/services/GenerateService.php(290): spacecatninja\imagerx\services\ImagerService->transformImage(Object(craft\elements\Asset), Array, Array, Array)
#3 /var/www/html/vendor/spacecatninja/imager-x/src/jobs/TransformJob.php(64): spacecatninja\imagerx\services\GenerateService->generateTransformsForAsset(Object(craft\elements\Asset), Array)
#4 /var/www/html/vendor/yiisoft/yii2-queue/src/Queue.php(246): spacecatninja\imagerx\jobs\TransformJob->execute(Object(craft\queue\Queue))
#5 /var/www/html/vendor/yiisoft/yii2-queue/src/cli/Queue.php(147): yii\queue\Queue->handleMessage('258', 'O:39:"spacecatn...', '300', 1)
#6 /var/www/html/vendor/craftcms/cms/src/queue/Queue.php(131): yii\queue\cli\Queue->handleMessage('258', 'O:39:"spacecatn...', '300', 1)
#7 [internal function]: craft\queue\Queue->craft\queue\{closure}(Object(Closure))
#8 /var/www/html/vendor/yiisoft/yii2-queue/src/cli/Queue.php(117): call_user_func(Object(Closure), Object(Closure))
#9 /var/www/html/vendor/craftcms/cms/src/queue/Queue.php(140): yii\queue\cli\Queue->runWorker(Object(Closure))
#10 /var/www/html/vendor/craftcms/cms/src/controllers/QueueController.php(84): craft\queue\Queue->run()
#11 [internal function]: craft\controllers\QueueController->actionRun()
#12 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#13 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#14 /var/www/html/vendor/craftcms/cms/src/web/Controller.php(190): yii\base\Controller->runAction('run', Array)
#15 /var/www/html/vendor/yiisoft/yii2/base/Module.php(534): craft\web\Controller->runAction('run', Array)
#16 /var/www/html/vendor/craftcms/cms/src/web/Application.php(276): yii\base\Module->runAction('queue/run', Array)
#17 /var/www/html/vendor/craftcms/cms/src/web/Application.php(585): craft\web\Application->runAction('queue/run', Array)
#18 /var/www/html/vendor/craftcms/cms/src/web/Application.php(255): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#19 /var/www/html/vendor/yiisoft/yii2/base/Application.php(392): craft\web\Application->handleRequest(Object(craft\web\Request))
#20 /var/www/html/web/index.php(26): yii\base\Application->run()
#21 {main}
meredevelopment commented 3 years ago

This issue is fixed by PR #3