Parametr konfiguracyjny „componentType” jest wymagany dla komponentu „Advanced_pricing_button”. | Aktualizacja Magento 2.0.7 => 2.1.0


15

Po wielu problemach udało mi się zaktualizować Magento 2.0.7 => Magento 2.1.0

Po sprawdzeniu aktualizacji widzę 2 problemy: 1. Frontend nie wyświetla żadnych produktów. 2. Kiedy chcę edytować produkty w panelu administratora, pojawia się następujący błąd:

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}

Czy ktoś naprawił ten problem?


Mam ten sam problem po aktualizacji z Magento 2.0.7 do Magento 2.1. Sprawdź problem na Github, aby uzyskać więcej informacji: github.com/magento/magento2/issues/5236
Tjitse,

Nie dodawaj odpowiedzi „dziękuję”. Po uzyskaniu wystarczającej reputacji będziesz mógł głosować na pytania i odpowiedzi , które okazały się pomocne. - Z recenzji
Jai

Odpowiedzi:


11

Miałem ten sam problem podczas migracji z Magento 2.0.7 do 2.1.0, następująca WAR opisana na https://github.com/magento/magento2/issues/5236 naprawiła problem dla mnie:

W vendor/magento/module-configurable-product/Ui/DataProvider/Product/Form/Modifier/ConfigurablePrice.phpwyglądzie z następującego kodu:

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

I zamień następujący wiersz:

'config' => $visibilityConfig,

Z:

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

Jeśli nie widzisz żadnych pól wypełnionych w katalogu produktów Magento BE, sprawdź inne produkty. W moim przypadku niektóre produkty zawierają następujący błąd:

Uwaga: Niezdefiniowane przesunięcie: 118 w /......./vendor/magento/module-eav/Model/ResourceModel/ReadHandler.php w linii 166

Dzieje się tak, ponieważ tabela catalog_product_entity_varcharzawiera atrybut, który nie istnieje w innych tabelach, w moim przypadku problem zniknął po prostu usuwając wpisy z attribute_idwymienionym w powyższym błędzie:

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

Upewnij się, że kopię zapasową bazy danych przed rozpoczęciem hacking precz!


Jeśli nie widzisz żadnych pól wypełnionych w katalogu produktów Magento BE lub pojawia się następujący błąd, wykonaj następujące czynności:
Michael

Po zmianie kodu daje mi błąd Class Magento\Catalog\Model\Product\Attribute\Backend\Media does not exist. Jakieś rozwiązanie tego?
Malaiselvan

Przepraszam, nie mam pojęcia ...
Michael

Kocham Cię ? Sporo.
Yonn Trimoreau

Czy to naprawiono teraz w Magento 2?
Stevie G,
Korzystając z naszej strony potwierdzasz, że przeczytałeś(-aś) i rozumiesz nasze zasady używania plików cookie i zasady ochrony prywatności.
Licensed under cc by-sa 3.0 with attribution required.