Le paramètre de configuration «componentType» est obligatoire pour le composant «advanced_pricing_button». | Mettre à niveau Magento 2.0.7 => 2.1.0


15

Après beaucoup de problèmes, j'ai réussi à mettre à jour Magento 2.0.7 => Magento 2.1.0

Après avoir vérifié la mise à niveau, je vois 2 problèmes: 1. Le frontend n'affiche aucun produit. 2. Lorsque je souhaite modifier les produits dans l'admin, j'obtiens l'erreur suivante:

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}

Quelqu'un a-t-il résolu ce problème?


J'ai le même problème après la mise à jour de Magento 2.0.7 vers Magento 2.1. Consultez le problème sur Github pour plus d'informations: github.com/magento/magento2/issues/5236
Tjitse

Veuillez ne pas ajouter "merci" comme réponse. Une fois que vous avez une réputation suffisante , vous pourrez voter pour les questions et réponses que vous avez trouvées utiles. - De l'avis
Jai

Réponses:


11

A eu le même problème lors de la migration de Magento 2.0.7 vers 2.1.0, le WAR suivant décrit sur https://github.com/magento/magento2/issues/5236 a résolu le problème pour moi:

À la vendor/magento/module-configurable-product/Ui/DataProvider/Product/Form/Modifier/ConfigurablePrice.phprecherche du code suivant:

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

Et remplacez la ligne suivante:

'config' => $visibilityConfig,

Avec:

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

Si vous ne voyez aucun champ renseigné dans votre catalogue de produits Magento BE, vérifiez d'autres produits. Dans mon cas, certains produits afficheraient l'erreur suivante:

Remarque: décalage indéfini: 118 dans /......./vendor/magento/module-eav/Model/ResourceModel/ReadHandler.php à la ligne 166

Cela se produit car la table catalog_product_entity_varcharcontient un attribut qui n'existe pas dans d'autres tables, dans mon cas, le problème a disparu en supprimant simplement les entrées avec la attribute_idliste dans l'erreur ci-dessus:

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

Assurez-vous de sauvegarder votre base de données avant de commencer à pirater!


Si vous ne voyez aucun champ renseigné dans votre catalogue de produits Magento BE ou obtenez l'erreur suivante, suivez les étapes ci-dessous:
Michael

Après avoir changé le code, cela me donne une erreur Class Magento\Catalog\Model\Product\Attribute\Backend\Media does not exist. Une solution à cela?
Malaiselvan

Désolé, aucune idée ...
Michael

Je t'aime ? Beaucoup.
Yonn Trimoreau

Est-ce corrigé maintenant dans magento 2?
Stevie G
En utilisant notre site, vous reconnaissez avoir lu et compris notre politique liée aux cookies et notre politique de confidentialité.
Licensed under cc by-sa 3.0 with attribution required.