1

listing file

<argument name="data" xsi:type="array">
    <item name="js_config" xsi:type="array">
        <item name="provider" xsi:type="string">faq_listing.faq_listing_data_source</item>
    </item>
</argument>
<settings>
    <spinner>faq_listing_columns</spinner>
    <deps>
        <dep>faq_listing.faq_listing_data_source</dep>
    </deps>
</settings>
<dataSource name="faq_listing_data_source" component="Magento_Ui/js/grid/provider">
    <settings>
        <storageConfig>
            <param name="indexField" xsi:type="string">faq_id</param>
        </storageConfig>
        <updateUrl path="mui/index/render"/>
    </settings>
    <dataProvider class="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider" name="faq_listing_data_source">
        <settings>
            <requestFieldName>faq_id</requestFieldName>
            <primaryFieldName>faq_id</primaryFieldName>
        </settings>
    </dataProvider>
</dataSource>
<columns name="customer_online_columns">
    <column name="customer_id">
        <settings>
            <filter>textRange</filter>
            <label translate="true">ID</label>
            <sorting>asc</sorting>
        </settings>
    </column>
    <column name="title">
        <settings>
            <filter>text</filter>
            <label translate="true">title</label>
        </settings>
    </column>
</columns>

/etc/di.xml

<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
    <arguments>
        <argument name="collections" xsi:type="array">
            <item name="faq_listing_data_source" xsi:type="string">Magento\Faq\Model\ResourceModel\Faq\Grid\Collection</item>
        </argument>
    </arguments>
</type>

<virtualType name="Magento\Faq\Model\ResourceModel\Faq\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
    <arguments>

how to resolve this error

Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Framework\View\Element\UiComponentFactory::argumentsResolver() must be of the type array, null given, called in /var/www/html/magento_2_2_4/vendor/magento/framework/View/Element/UiComponentFactory.php on line 206 and defined in /var/www/html/magento_2_2_4/vendor/magento/framework/View/Element/UiComponentFactory.php:172 Stack trace: #0 /var/www/html/magento_2_2_4/vendor/magento/framework/View/Element/UiComponentFactory.php(206): Magento\Framework\View\Element\UiComponentFactory->argumentsResolver('faq_listing', NULL) #1 /var/www/html/magento_2_2_4/vendor/magento/framework/View/Layout/Generator/UiComponent.php(135): Magento\Framework\View\Element\UiComponentFactory->create('faq_listing', NULL, Array) #2 /var/www/html/magento_2_2_4/vendor/magento/framework/View/Layout/Generator/UiComponent.php(97): Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(Object(Magento\Framework\View\Layout\Data\Structure), 'faq_listing', Array, Object(Magento\Framew in /var/www/html/magento_2_2_4/vendor/magento/framework/View/Element/UiComponentFactory.php on line 172

0

Check the parent and child class constructors, child class constructor may not be passing all the required arguments to will calling the parent constructor.
After making the constructor arguments same run php bin/magento setup:upgrade from CLI

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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