1

I just upgrade Magento 2.3.0 to Magento 2.3.5, But after installation In Admin > Catalog > Products I cannot edit or Add new products, When I am trying to add or edit Product Page then getting below error.

Notice: Undefined index: quantity in /vendor/magento/framework/View/Element/UiComponentFactory.php on line 412

Please help me regrading about this issue. I am badly stuck in this issue.

enter image description here

Thanks

4
  • reindex may help you, php bin/magento indexer:reindex
    – MagentoDev
    Commented Oct 17, 2020 at 15:27
  • i have already done many times, but not effected. Commented Oct 17, 2020 at 15:58
  • Maybe downgrade to 2.3.0 again and then first upgrade to 2.3.1, test and see if it still works and if it works then upgrade to 2.3.2 and so on... until you found the point where it breaks and then inspect what code was added that could possibly break the code
    – Black
    Commented Oct 22, 2020 at 10:41
  • No, actually everything is working fine in backend and frontend - only in admin product page is not opening. Commented Oct 22, 2020 at 11:12

1 Answer 1

0

I am just speculating here..

The error is related to quantity not being set in an array that comes from the data source, this is most likely related to the MSI functionality as it was new in 2.3. If you are not using MSI with multiple stocks you could start to try to disable it, you can follow the instructions on the devdoc for this:

https://devdocs.magento.com/extensions/inventory-management/

Otherwise, I think there are some problem in either the data provider for the product_form.xml ui component or the product_form.xml itself. As the error thrown is related to the quantity field you could try to comment out the <field name="quantity" .../> nodes in your product_form.xml and see what happens. E.g. in this file:

vendor/magento/module-inventory-catalog-admin-ui/view/adminhtml/ui_component/product_form.xml

<!--
                <field name="quantity" component="Magento_InventoryCatalogAdminUi/js/product/form/sources/qty" formElement="input" sortOrder="50">
                    <settings>
            ....
                    </settings>
                </field>

-->

However, disabling MSI if you are not using it is your best bet. Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.