Magento 2错误:类中的属性“ xxx”没有对应的setter

时间:2018-08-07 00:00:17

标签: magento magento2

我们正在使用Magento 2.1并安装了此Store Pickup module,但未正确安装。

该模块已通过SSH禁用,现在我们在与商店提货相关的Checkout中收到错误消息。

从日志中:

Next Exception: Report ID: webapi-5b689909809ce; Message: Property "PickupStore" does not have corresponding setter in class "Magento\Checkout\Api\Data\ShippingInformationExtensionInterface". in /home/reorder/public_html/vendor/magento/framework/Webapi/ErrorProcessor.php:195
Stack trace:
#0 /home/reorder/public_html/vendor/magento/framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(LogicException))
#1 /home/reorder/public_html/vendor/magento/module-webapi/Controller/Rest.php(219): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(LogicException))
#2 /home/reorder/public_html/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /home/reorder/public_html/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /home/reorder/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#5 /home/reorder/public_html/routes.php(225): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#6 /home/reorder/public_html/wingstop/index.php(6): include('/home/reorder/p...')
#7 {main} [] []
[2018-08-06 18:54:13] main.CRITICAL: LogicException: Property "PickupStore" does not have corresponding setter in class "Magento\Checkout\Api\Data\ShippingInformationExtensionInterface". in /home/reorder/public_html/vendor/magento/framework/Reflection/NameFinder.php:100
Stack trace:
#0 /home/reorder/public_html/vendor/magento/framework/Reflection/NameFinder.php(59): Magento\Framework\Reflection\NameFinder->findAccessorMethodName(Object(Zend\Code\Reflection\ClassReflection), 'PickupStore', 'getPickupStore', 'isPickupStore')
#1 /home/reorder/public_html/vendor/magento/framework/Webapi/ServiceInputProcessor.php(158): Magento\Framework\Reflection\NameFinder->getGetterMethodName(Object(Zend\Code\Reflection\ClassReflection), 'PickupStore')
#2 /home/reorder/public_html/vendor/magento/framework/Webapi/ServiceInputProcessor.php(322): Magento\Framework\Webapi\ServiceInputProcessor->_createFromArray('\\Magento\\Checko...', Array)
#3 /home/reorder/public_html/vendor/magento/framework/Webapi/ServiceInputProcessor.php(175): Magento\Framework\Webapi\ServiceInputProcessor->convertValue(Array, '\\Magento\\Checko...')
#4 /home/reorder/public_html/vendor/magento/framework/Webapi/ServiceInputProcessor.php(322): Magento\Framework\Webapi\ServiceInputProcessor->_createFromArray('Magento\\Checkou...', Array)
#5 /home/reorder/public_html/vendor/magento/framework/Webapi/ServiceInputProcessor.php(119): Magento\Framework\Webapi\ServiceInputProcessor->convertValue(Array, 'Magento\\Checkou...')
#6 /home/reorder/public_html/vendor/magento/module-webapi/Controller/Rest/InputParamsResolver.php(101): Magento\Framework\Webapi\ServiceInputProcessor->process('Magento\\Checkou...', 'saveAddressInfo...', Array)
#7 /home/reorder/public_html/vendor/magento/module-webapi/Controller/Rest.php(299): Magento\Webapi\Controller\Rest\InputParamsResolver->resolve()
#8 /home/reorder/public_html/vendor/magento/module-webapi/Controller/Rest.php(216): Magento\Webapi\Controller\Rest->processApiRequest()
#9 /home/reorder/public_html/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#10 /home/reorder/public_html/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#11 /home/reorder/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#12 /home/reorder/public_html/routes.php(225): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#13 /home/reorder/public_html/wingstop/index.php(6): include('/home/reorder/p...')
#14 {main}

从我收集的信息中,我应该尝试找到extension_attributes.xml并可能将其从那里删除?

如果是这样,我找不到它;这是我什至应该寻找的东西吗?非常感谢您的帮助,因为用户现在无法在结帐时继续越过“运送选项”屏幕。

from this answer我有点担心删除我的生成文件夹中的所有文件夹。每当Magento 2实例生成新的文件夹和文件/部署内容时,它似乎总是使事情变得混乱。

1 个答案:

答案 0 :(得分:0)

1)将商店置于维护模式

bin/magento maintenance:enable

2)删除生成和DI内容

rm -rf var/generation/*
rm -rf var/di/*

3)使用编译器重新生成这些

bin/magento setup:upgrade
bin/magento setup:di:compile

4)禁用维护模式

bin/magento maintenance:disable

总是把事情搞砸了是什么意思?这可能是由于您设置中的权限问题引起的。