# 常见问题 四 ## 54,'Vertex\\Tax\\Model\\Flexfield\\Processor\\InvoiceFlexFieldProcessorInterface' not found > PHP Fatal error: Interface 'Vertex\Tax\Model\Flexfield\Processor\InvoiceFlexFieldProcessorInterface' not found in vendor/vertex/module-tax/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php on line 24 这是2.3.3的一个bug, [https://github.com/magento/magento2/issues/24930](https://github.com/magento/magento2/issues/24930) 解决办法: 打开 `/vendor/vertex/module-tax/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php` 添加2个`use` ``` use Vertex\Tax\Model\FlexField\Processor\InvoiceFlexFieldProcessorInterface; use Vertex\Tax\Model\FlexField\Processor\TaxCalculationFlexFieldProcessorInterface; ``` ## 55,Invalid Form Key. Please refresh the page 后台产品保存的时候报错 `Invalid Form Key. Please refresh the page` 这是产品编辑页面的表单数据太大了,或者说是上传的产品图片太大了,超出了php限制。需要改下php.ini 找到 `max_input_vars`,改成: ``` max_input_vars 10000 ``` ## 56,Call to a member function getOptionsJson() on null in vendor/magento/module-catalog/view/frontend/templates/product/view/gallery.phtml:46 在2.3.3及以上版本会出现这种错误,是因为你的主题有重写gallery.phtml,缺少参数,需要加进去。 解决办法: ``` grep -irn 'View.Gallery' app/design ``` 找到catalog_product_view.xml文件里的 ``` <block class="Magento\Catalog\Block\Product\View\Gallery" name="product.info.media.image" template="product/view/gallery.phtml"> ``` 类似这样的代码,改成 ``` <block class="Magento\Catalog\Block\Product\View\Gallery" name="product.info.media.image" template="product/view/gallery.phtml"> <arguments> <argument name="gallery_options" xsi:type="object">Magento\Catalog\Block\Product\View\GalleryOptions</argument> </arguments> </block> ``` 也就是把 ``` <arguments> <argument name="gallery_options" xsi:type="object">Magento\Catalog\Block\Product\View\GalleryOptions</argument> </arguments> ``` 加进去就行了。 参考: [https://github.com/magento/magento2/issues/23432](https://github.com/magento/magento2/issues/23432) ## 57,禁用Temando_Shipping插件后 后台产品编辑页面打开报错 Uncaught Error: Cannot instantiate interface Temando\Shipping\Model\ResourceModel\Repository\PackagingR epositoryInterface in /var/www/magento2demo.com/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50 **解决办法:** 把产品属性source_model含有Temando相关的属性删掉 ``` DELETE FROM `eav_attribute` WHERE `source_model` LIKE '%Temando%' ``` 再编译清缓存 ``` php bin/magento setup:di:compile rm -rf var/cache/* var/page_cache/* generated/code/* ``` ## 58, Notice: Undefined offset: 2 in vendor/magento/framework/Encryption/Encryptor.php on line 591 在php7.2以上 / m2 2.3.3及以上版本会出现这问题。 解决办法有2种, 1),重新创建admin user 比如创建新用户test ``` php bin/magento admin:user:create --admin-user test --admin-password test123456 --admin-email =zouhongzhao@126.com --admin-firstname test --admin-lastname test ``` 2),安装php sodium扩展 具体的google ## 59,DateTimeZone::__construct(): Unknown or bad timezone () ~~~ 1 exception(s): Exception #0 (Exception): DateTimeZone::__construct(): Unknown or bad timezone () ~~~ 这应该是主题或者插件因为某种特殊原因在core_config_data表里创建了个value为null的记录,比如 ~~~ select * FROM `core_config_data` WHERE path = 'general' ~~~ 有`general`这条记录的话,就删掉试试 ~~~ DELETE FROM `core_config_data` WHERE path = 'general' ~~~ 然后 再刷新页面测试下看是不好了。 参考:[https://magento.stackexchange.com/questions/135188/my-magento-2-website-is-crashed-unknown-or-bad-timezone-error](https://magento.stackexchange.com/questions/135188/my-magento-2-website-is-crashed-unknown-or-bad-timezone-error)