Tham số cấu hình thành phần của thành phần kỹ thuật số là một yêu cầu đối với thành phần nâng cao_pricing_button. | Nâng cấp Magento 2.0.7 => 2.1.0


15

Sau rất nhiều vấn đề, tôi đã quản lý để cập nhật Magento 2.0.7 => Magento 2.1.0

Sau khi kiểm tra nâng cấp tôi thấy có 2 vấn đề: 1. Frontend không hiển thị bất kỳ sản phẩm nào. 2. Khi tôi muốn chỉnh sửa các sản phẩm trong quản trị viên, tôi gặp phải lỗi sau:

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}

Có ai đã sửa vấn đề này chưa?


Tôi đã gặp vấn đề tương tự sau khi cập nhật từ Magento 2.0.7 lên Magento 2.1. Kiểm tra vấn đề trên Github để biết thêm thông tin: github.com/magento/magento2/issues/5236
Tjitse

Vui lòng không thêm "cảm ơn" làm câu trả lời. Khi bạn có đủ danh tiếng , bạn sẽ có thể bỏ phiếu cho các câu hỏi và câu trả lời mà bạn thấy hữu ích. - Từ đánh giá
Jai

Câu trả lời:


11

Có vấn đề tương tự khi di chuyển từ Magento 2.0.7 sang 2.1.0, WAR sau đây được mô tả trên https://github.com/magento/magento2/issues/5236 đã khắc phục sự cố cho tôi:

Tìm vendor/magento/module-configurable-product/Ui/DataProvider/Product/Form/Modifier/ConfigurablePrice.phpmã sau đây:

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

Và thay thế dòng sau:

'config' => $visibilityConfig,

Với:

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

Nếu bạn không thấy bất kỳ trường nào được điền trong danh mục sản phẩm Magento BE thì hãy kiểm tra một số sản phẩm khác. Trong trường hợp của tôi, một số sản phẩm sẽ hiển thị lỗi sau:

Lưu ý: Phần bù không xác định: 118 in /......./vendor/magento/module-eav/Model/ResourceModel/ReadHandler.php trên dòng 166

Điều này xảy ra bởi vì bảng catalog_product_entity_varcharchứa một thuộc tính không tồn tại trong các bảng khác, trong trường hợp của tôi, vấn đề đã biến mất chỉ bằng cách xóa các mục có attribute_idliệt kê trong lỗi ở trên:

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

Hãy chắc chắn rằng bạn sao lưu cơ sở dữ liệu của bạn trước khi bạn bắt đầu hack đi!


Nếu bạn không thấy bất kỳ trường nào được điền trong danh mục sản phẩm Magento của bạn BE hoặc gặp lỗi sau, hãy làm theo các bước dưới đây:
Michael

Sau khi thay đổi mã, nó cho tôi một lỗi Class Magento\Catalog\Model\Product\Attribute\Backend\Media does not exist. Bất kỳ giải pháp cho điều này?
Malaiselvan

Xin lỗi, không có ý kiến ​​gì ...
Michael

Tôi mến bạn ? Khá nhiều.
Yonn Trimoreau

Điều này đã được sửa trong magento 2 chưa?
Stevie G
Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookieChính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.