发布宝贝后经常出现这种错误提示

bug问题 · Blueyii · 于 6年前 发布 · 2972 次阅读
An Error occurred while handling another error:
exception 'ReflectionException' with message 'Method fecshop\services\product\Image::getResize() does not exist' in /www/web/wishbuy/vendor/yiisoft/yii2/web/ErrorHandler.php:195
Stack trace:
#0 /www/web/wishbuy/vendor/yiisoft/yii2/web/ErrorHandler.php(195): ReflectionMethod->__construct('fecshop\\service...', 'getResize')
#1 /www/web/wishbuy/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php(26): yii\web\ErrorHandler->addTypeLinks('fecshop\\service...')
#2 /www/web/wishbuy/vendor/yiisoft/yii2/base/View.php(330): require('/www/web/wishbu...')
#3 /www/web/wishbuy/vendor/yiisoft/yii2/base/View.php(250): yii\base\View->renderPhpFile('/www/web/wishbu...', Array)
#4 /www/web/wishbuy/vendor/yiisoft/yii2/web/ErrorHandler.php(249): yii\base\View->renderFile('@yii/views/erro...', Array, Object(yii\web\ErrorHandler))
#5 /www/web/wishbuy/vendor/yiisoft/yii2/web/ErrorHandler.php(304): yii\web\ErrorHandler->renderFile('@yii/views/erro...', Array)
#6 /www/web/wishbuy/vendor/yiisoft/yii2/web/ErrorHandler.php(326): yii\web\ErrorHandler->renderCallStackItem('/www/web/wishbu...', 46, 'fecshop\\service...', 'getResize', Array, 11)
#7 /www/web/wishbuy/vendor/yiisoft/yii2/views/errorHandler/exception.php(381): yii\web\ErrorHandler->renderCallStack(Object(Imagine\Exception\RuntimeException))
#8 /www/web/wishbuy/vendor/yiisoft/yii2/base/View.php(330): require('/www/web/wishbu...')
#9 /www/web/wishbuy/vendor/yiisoft/yii2/base/View.php(250): yii\base\View->renderPhpFile('/www/web/wishbu...', Array)
#10 /www/web/wishbuy/vendor/yiisoft/yii2/web/ErrorHandler.php(249): yii\base\View->renderFile('@yii/views/erro...', Array, Object(yii\web\ErrorHandler))
#11 /www/web/wishbuy/vendor/yiisoft/yii2/web/ErrorHandler.php(116): yii\web\ErrorHandler->renderFile('@yii/views/erro...', Array)
#12 /www/web/wishbuy/vendor/yiisoft/yii2/base/ErrorHandler.php(111): yii\web\ErrorHandler->renderException(Object(Imagine\Exception\RuntimeException))
#13 [internal function]: yii\base\ErrorHandler->handleException(Object(Imagine\Exception\RuntimeException))
#14 {main}
Previous exception:
exception 'ErrorException' with message 'imagejpeg(/www/web/wishbuy/appimage/common/media/catalog/product/cache/bd935443df1c50537d4edaab4af5d446/600/0/0/mr/0mrdjr8ve462m0l1510809914.jpg): failed to open stream: No such file or directory' in /www/web/wishbuy/vendor/imagine/imagine/lib/Imagine/Gd/Image.php:584
Stack trace:
#0 [internal function]: Imagine\Gd\Image->Imagine\Gd\{closure}('<span class="nu...', '<span class="st...', '<span class="st...', '<span class="nu...', '...')
#1 [internal function]: imagejpeg('<span class="ke...', '<span class="st...')
#2 /www/web/wishbuy/vendor/imagine/imagine/lib/Imagine/Gd/Image.php(584): call_user_func_array('<span class="st...', '[<span class="n...')
#3 /www/web/wishbuy/vendor/imagine/imagine/lib/Imagine/Gd/Image.php(210): Imagine\Gd\Image->saveOrOutput('<span class="st...', '[]', '<span class="st...')
#4 /www/web/wishbuy/vendor/fancyecommerce/fec/helpers/CImage.php(140): Imagine\Gd\Image->save('<span class="st...')
#5 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/product/Image.php(129): fec\helpers\CImage::saveResizeMiddleWaterImg('<span class="st...', '<span class="st...', '<span class="nu...', '<span class="st...')
#6 [internal function]: fecshop\services\product\Image->actionGetResize('<span class="st...', '<span class="nu...', '<span class="ke...')
#7 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/Service.php(49): call_user_func_array('[<span class="t...', '[<span class="s...')
#8 /www/web/wishbuy/appfront/theme/terry/theme01/catalog/product/index/custom_option.php(46): fecshop\services\Service->__call('<span class="st...', '[<span class="s...')
#9 /www/web/wishbuy/appfront/theme/terry/theme01/catalog/product/index/custom_option.php(46): fecshop\services\product\Image->getResize('/0/mr/0mrdjr8ve...', 600, false)
#10 /www/web/wishbuy/vendor/yiisoft/yii2/base/View.php(330): require('/www/web/wishbu...')
#11 /www/web/wishbuy/vendor/yiisoft/yii2/base/View.php(250): yii\base\View->renderPhpFile('/www/web/wishbu...', Array)
#12 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/page/Widget.php(104): yii\base\View->renderFile('/www/web/wishbu...', Array)
#13 [internal function]: fecshop\services\page\Widget->actionRenderContentHtml('', Array, Array)
#14 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/Service.php(49): call_user_func_array(Array, Array)
#15 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/page/Widget.php(139): fecshop\services\Service->__call('renderContentHt...', Array)
#16 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/page/Widget.php(139): fecshop\services\page\Widget->renderContentHtml('', Array, Array)
#17 [internal function]: fecshop\services\page\Widget->actionRenderContent('', Array, Array)
#18 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/Service.php(49): call_user_func_array(Array, Array)
#19 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/page/Widget.php(66): fecshop\services\Service->__call('renderContent', Array)
#20 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/page/Widget.php(66): fecshop\services\page\Widget->renderContent('', Array, Array)
#21 [internal function]: fecshop\services\page\Widget->actionRender(Array, Array)
#22 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/Service.php(49): call_user_func_array(Array, Array)
#23 /www/web/wishbuy/appfront/theme/terry/theme01/catalog/product/index.php(120): fecshop\services\Service->__call('render', Array)
#24 /www/web/wishbuy/appfront/theme/terry/theme01/catalog/product/index.php(120): fecshop\services\page\Widget->render(Array, Array)
#25 /www/web/wishbuy/vendor/yiisoft/yii2/base/View.php(330): require('/www/web/wishbu...')
#26 /www/web/wishbuy/vendor/yiisoft/yii2/base/View.php(250): yii\base\View->renderPhpFile('/www/web/wishbu...', Array)
#27 /www/web/wishbuy/vendor/fancyecommerce/fecshop/app/appfront/modules/AppfrontController.php(96): yii\base\View->renderFile('/www/web/wishbu...', Array, Object(fecshop\app\appfront\modules\Catalog\controllers\ProductController))
#28 /www/web/wishbuy/vendor/fancyecommerce/fecshop/app/appfront/modules/Catalog/controllers/ProductController.php(32): fecshop\app\appfront\modules\AppfrontController->render('index', Array)
#29 [internal function]: fecshop\app\appfront\modules\Catalog\controllers\ProductController->actionIndex()
#30 /www/web/wishbuy/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#31 /www/web/wishbuy/vendor/yiisoft/yii2/base/Controller.php(156): yii\base\InlineAction->runWithParams(Array)
#32 /www/web/wishbuy/vendor/yiisoft/yii2/base/Module.php(523): yii\base\Controller->runAction('index', Array)
#33 /www/web/wishbuy/vendor/yiisoft/yii2/web/Application.php(102): yii\base\Module->runAction('catalog/product...', Array)
#34 /www/web/wishbuy/vendor/yiisoft/yii2/base/Application.php(380): yii\web\Application->handleRequest(Object(fecshop\yii\web\Request))
#35 /www/web/wishbuy/appfront/web/index.php(86): yii\base\Application->run()
#36 {main}

Next exception 'Imagine\Exception\RuntimeException' with message 'imagejpeg(/www/web/wishbuy/appimage/common/media/catalog/product/cache/bd935443df1c50537d4edaab4af5d446/600/0/0/mr/0mrdjr8ve462m0l1510809914.jpg): failed to open stream: No such file or directory' in /www/web/wishbuy/vendor/imagine/imagine/lib/Imagine/Gd/Image.php:691
Stack trace:
#0 [internal function]: Imagine\Gd\Image->Imagine\Gd\{closure}('<span class="nu...', '<span class="st...', '<span class="st...', '<span class="nu...', '...')
#1 [internal function]: imagejpeg('<span class="ke...', '<span class="st...')
#2 /www/web/wishbuy/vendor/imagine/imagine/lib/Imagine/Gd/Image.php(584): call_user_func_array('<span class="st...', '[<span class="n...')
#3 /www/web/wishbuy/vendor/imagine/imagine/lib/Imagine/Gd/Image.php(210): Imagine\Gd\Image->saveOrOutput('<span class="st...', '[]', '<span class="st...')
#4 /www/web/wishbuy/vendor/fancyecommerce/fec/helpers/CImage.php(140): Imagine\Gd\Image->save('<span class="st...')
#5 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/product/Image.php(129): fec\helpers\CImage::saveResizeMiddleWaterImg('<span class="st...', '<span class="st...', '<span class="nu...', '<span class="st...')
#6 [internal function]: fecshop\services\product\Image->actionGetResize('<span class="st...', '<span class="nu...', '<span class="ke...')
#7 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/Service.php(49): call_user_func_array('[<span class="t...', '[<span class="s...')
#8 /www/web/wishbuy/appfront/theme/terry/theme01/catalog/product/index/custom_option.php(46): fecshop\services\Service->__call('<span class="st...', '[<span class="s...')
#9 /www/web/wishbuy/appfront/theme/terry/theme01/catalog/product/index/custom_option.php(46): fecshop\services\product\Image->getResize('/0/mr/0mrdjr8ve...', 600, false)
#10 /www/web/wishbuy/vendor/yiisoft/yii2/base/View.php(330): require('/www/web/wishbu...')
#11 /www/web/wishbuy/vendor/yiisoft/yii2/base/View.php(250): yii\base\View->renderPhpFile('/www/web/wishbu...', Array)
#12 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/page/Widget.php(104): yii\base\View->renderFile('/www/web/wishbu...', Array)
#13 [internal function]: fecshop\services\page\Widget->actionRenderContentHtml('', Array, Array)
#14 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/Service.php(49): call_user_func_array(Array, Array)
#15 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/page/Widget.php(139): fecshop\services\Service->__call('renderContentHt...', Array)
#16 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/page/Widget.php(139): fecshop\services\page\Widget->renderContentHtml('', Array, Array)
#17 [internal function]: fecshop\services\page\Widget->actionRenderContent('', Array, Array)
#18 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/Service.php(49): call_user_func_array(Array, Array)
#19 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/page/Widget.php(66): fecshop\services\Service->__call('renderContent', Array)
#20 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/page/Widget.php(66): fecshop\services\page\Widget->renderContent('', Array, Array)
#21 [internal function]: fecshop\services\page\Widget->actionRender(Array, Array)
#22 /www/web/wishbuy/vendor/fancyecommerce/fecshop/services/Service.php(49): call_user_func_array(Array, Array)
#23 /www/web/wishbuy/appfront/theme/terry/theme01/catalog/product/index.php(120): fecshop\services\Service->__call('render', Array)
#24 /www/web/wishbuy/appfront/theme/terry/theme01/catalog/product/index.php(120): fecshop\services\page\Widget->render(Array, Array)
#25 /www/web/wishbuy/vendor/yiisoft/yii2/base/View.php(330): require('/www/web/wishbu...')
#26 /www/web/wishbuy/vendor/yiisoft/yii2/base/View.php(250): yii\base\View->renderPhpFile('/www/web/wishbu...', Array)
#27 /www/web/wishbuy/vendor/fancyecommerce/fecshop/app/appfront/modules/AppfrontController.php(96): yii\base\View->renderFile('/www/web/wishbu...', Array, Object(fecshop\app\appfront\modules\Catalog\controllers\ProductController))
#28 /www/web/wishbuy/vendor/fancyecommerce/fecshop/app/appfront/modules/Catalog/controllers/ProductController.php(32): fecshop\app\appfront\modules\AppfrontController->render('index', Array)
#29 [internal function]: fecshop\app\appfront\modules\Catalog\controllers\ProductController->actionIndex()
#30 /www/web/wishbuy/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#31 /www/web/wishbuy/vendor/yiisoft/yii2/base/Controller.php(156): yii\base\InlineAction->runWithParams(Array)
#32 /www/web/wishbuy/vendor/yiisoft/yii2/base/Module.php(523): yii\base\Controller->runAction('index', Array)
#33 /www/web/wishbuy/vendor/yiisoft/yii2/web/Application.php(102): yii\base\Module->runAction('catalog/product...', Array)
#34 /www/web/wishbuy/vendor/yiisoft/yii2/base/Application.php(380): yii\web\Application->handleRequest(Object(fecshop\yii\web\Request))
#35 /www/web/wishbuy/appfront/web/index.php(86): yii\base\Application->run()
#36 {main}
共收到 5 条回复
Fecmall#26年前 1 个赞

您把这两个文件的内容覆盖后,然后看看,是否还有问题

Blueyii#36年前 0 个赞

非常感谢!:bowtie:

Blueyii#46年前 1 个赞

@Terry [[#2楼](#comment2)](#comment2) 问题又出现了,最后发现是在@services\product\Image.php 第164行的判断上有问题,假如图片的路径是 0/dl/0dle0bt89sh5p3i1516415011.jpg, 在这一步,把 0 的目录给忽略了,造成生成的图片路径错误:

if ($igf && !strstr($igf, '.')) {

改为:

if ($igf != '' && !strstr($igf, '.')) {
添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics