Solved: Argument Passed Must Be Array, Null Given Error in Magento 2 Admin Grid
In this post, find possible reasons and a solution to the “Argument passed must be array, Null given” error in the Magento 2 custom order grid.
Recently, I was coding a custom order grid for a Magento 2 customization project. Everything was going fine until my screen flashed with an error.
It read: “Argument 2 passed to Magento\Framework\View\Element\UiComponentFactory::argumentsResolver() must be of the type array, null given.”
It was unexpected. Annoying. And alarming.
The error appears clear enough that there is some UI component misconfiguration or issues with the data source setup. I investigated the matter further and found a solution that worked for me.
If you’re also facing the “Argument passed must be array, Null given” error in Magento 2 while coding a custom grid, read this post till the end to find the solution.
How to Solve “Argument Passed Must Be Array, Null Given” Error in Magento 2?
The following error:
Argument 2 passed to Magento\Framework\View\Element\UiComponentFactory::argumentsResolver()
means that a null value is passed to a function where an array is expected.
It can appear while coding a custom admin grid.
Generally, it occurs when there is mismatch of the UiComponent name in the layout.xml.
The solution: Review the uiComponent in the layout.xml file and correct any typos or spelling mistakes.
That’s it. Problem solved? Show your cheers by rating this post with five stars.
And if you’re still facing any issues related to the “Argument Passed Must Be Array, Null Given” Error in Magento 2 Admin Grid, feel free to comment. I’ll be happy to help you.
Happy Coding 🙂
Jignesh Parmar
An expert in his field, Jignesh is the team leader at Meetanshi and a certified Magento developer. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.
Prev
How to Add Logo to Shopify – All Pages, Footer & More
7 Best Oberlo Alternatives for Shopify & WooCommerce [2024]
Next