配置参数“ componentType”是“ advanced_pricing_button”组件所必需的。| 升级Magento 2.0.7 => 2.1.0


15

经过很多问题后,我设法更新了Magento 2.0.7 => Magento 2.1.0

检查升级后,我看到两个问题:1.前端未显示任何产品。2.当我要在管理员中编辑产品时,出现以下错误:

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): The configuration parameter "componentType" is a required for "advanced_pricing_button" component.

Exception #0 (Magento\Framework\Exception\LocalizedException): The configuration parameter "componentType" is a required for "advanced_pricing_button" component.
#0 /home/tm/public_html/vendor/magento/framework/View/Element/UiComponentFactory.php(360): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
#1 /home/tm/public_html/vendor/magento/framework/View/Element/UiComponentFactory.php(360): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
#2 /home/tm/public_html/vendor/magento/framework/View/Element/UiComponentFactory.php(360): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
#3 /home/tm/public_html/vendor/magento/framework/View/Element/UiComponentFactory.php(272): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
#4 /home/tm/public_html/vendor/magento/framework/View/Element/UiComponentFactory.php(164): Magento\Framework\View\Element\UiComponentFactory->mergeMetadata('product_form', Array, false)
#5 /home/tm/public_html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(124): Magento\Framework\View\Element\UiComponentFactory->create('product_form', NULL, Array)

#6 /home/tm/public_html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(93): Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(Object(Magento\Framework\View\Layout\Data\Structure), 'product_form', Array, Object(Magento\Framework\View\Layout\Interceptor))
#7 /home/tm/public_html/vendor/magento/framework/View/Layout/GeneratorPool.php(86): Magento\Framework\View\Layout\Generator\UiComponent->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#8 /home/tm/public_html/vendor/magento/framework/View/Layout.php(327): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#9 /home/tm/public_html/vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout->generateElements()
#10 /home/tm/public_html/vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#11 /home/tm/public_html/vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
#12 /home/tm/public_html/vendor/magento/framework/View/Layout.php(244): Magento\Framework\View\Layout\Builder->build()
#13 /home/tm/public_html/vendor/magento/framework/View/Layout.php(859): Magento\Framework\View\Layout->build()
#14 /home/tm/public_html/vendor/magento/module-backend/Model/View/Result/Page.php(59): Magento\Framework\View\Layout->getBlock('menu')
#15 /home/tm/public_html/var/generation/Magento/Backend/Model/View/Result/Page/Interceptor.php(24): Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Catalog...')
#16 /home/tm/public_html/vendor/magento/module-catalog/Controller/Adminhtml/Product/Edit.php(69): Magento\Backend\Model\View\Result\Page\Interceptor->setActiveMenu('Magento_Catalog...')
#17 /home/tm/public_html/var/generation/Magento/Catalog/Controller/Adminhtml/Product/Edit/Interceptor.php(24): Magento\Catalog\Controller\Adminhtml\Product\Edit->execute()
#18 /home/tm/public_html/vendor/magento/framework/App/Action/Action.php(102): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->execute()
#19 /home/tm/public_html/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#20 /home/tm/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#21 /home/tm/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->___callParent('dispatch', Array)
#22 /home/tm/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor), Array, 'adminAuthentica...')
#23 /home/tm/public_html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#24 /home/tm/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#25 /home/tm/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor), Array, 'adminMassaction...')
#26 /home/tm/public_html/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#27 /home/tm/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#28 /home/tm/public_html/var/generation/Magento/Catalog/Controller/Adminhtml/Product/Edit/Interceptor.php(39): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->___callPlugins('dispatch', Array, Array)
#29 /home/tm/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#30 /home/tm/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#31 /home/tm/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#32 /home/tm/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#33 /home/tm/public_html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#34 /home/tm/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#35 /home/tm/public_html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#36 /home/tm/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#37 /home/tm/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#38 /home/tm/public_html/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#39 {main}

有人解决了这个问题吗?


从Magento 2.0.7更新到Magento 2.1之后,我遇到了同样的问题。在Github上查看该问题以获取更多信息:github.com/magento/magento2/issues/5236
Tjitse

请不要添加“谢谢”作为答案。拥有足够的声誉后,您将可以投票认为有用的问题和答案。- 评分
武汉佳

Answers:


11

从Magento 2.0.7迁移到2.1.0时遇到了同样的问题,https://github.com/magento/magento2/issues/5236上描述的以下WAR 为我解决了这个问题:

vendor/magento/module-configurable-product/Ui/DataProvider/Product/Form/Modifier/ConfigurablePrice.php寻找以下代码:

$meta[$groupCode]['children'][self::CODE_GROUP_PRICE] = array_replace_recursive(
    $meta[$groupCode]['children'][self::CODE_GROUP_PRICE],
    [
        'children' => [
            self::$advancedPricingButton => [
                'arguments' => [
                    'data' => [
                        'config' => $visibilityConfig,
                    ],
                ],
            ],
        ],
    ]
);

并替换以下行:

'config' => $visibilityConfig,

带有:

'config' => ['componentType'=>'container',$visibilityConfig],

如果您没有在Magento产品目录中看到任何填写的字段,请检查其他产品。就我而言,某些产品将显示以下错误:

注意:未定义的偏移量:/......./vendor/magento/module-eav/Model/ResourceModel/ReadHandler.php在第166行中为118

发生这种情况是因为表catalog_product_entity_varchar包含其他表中不存在的属性,在我的情况下,问题只是通过删除attribute_id上面错误中列出的条目而消失了:

mysql> delete from catalog_product_entity_varchar where attribute_id=XXXXXXX;
Query OK, 7890 rows affected (0.11 sec)

开始黑客攻击之前,请确保已备份数据库


如果您未在Magento产品目录BE中看到任何填充的字段或出现以下错误,请按照以下步骤操作:
迈克尔

更改代码后,它给我一个错误Class Magento\Catalog\Model\Product\Attribute\Backend\Media does not exist。有什么解决办法吗?
Malaiselvan '16

抱歉,不知道……
Michael

我爱你 ?非常多。
Yonn Trimoreau'8

现在在magento 2中修复了吗?
Stevie G'3
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.