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>

This error are comes to my screen so 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

0

your Column name is miss match

<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 name="deps" xsi:type="string">faq_listing.faq_listing_data_source</item>
    </item>
    <item name="spinner" xsi:type="string">faq_listing_columns</item>
</argument>
<dataSource name="faq_listing_data_source">
    <argument name="dataProvider" xsi:type="configurableObject">
        <argument name="class" xsi:type="string">Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider</argument>
        <argument name="name" xsi:type="string">faq_listing_data_source</argument>
        <argument name="primaryFieldName" xsi:type="string">faq_id</argument>
        <argument name="requestFieldName" xsi:type="string">faq_id</argument>
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="update_url" xsi:type="url" path="mui/index/render"/>
            </item>
        </argument>
    </argument>
    <argument name="data" xsi:type="array">
        <item name="js_config" xsi:type="array">
            <item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
        </item>
    </argument>
</dataSource>
<columns name="faq_listing_columns">
    <selectionsColumn name="ids">
       <argument name="data" xsi:type="array">
           <item name="config" xsi:type="array">
               <item name="indexField" xsi:type="string">faq_id</item>
               <item name="sorting" xsi:type="string">desc</item>
               <item name="sortOrder" xsi:type="number">0</item>
           </item>
       </argument>
   </selectionsColumn>
   <column name="customer_id">
       <argument name="data" xsi:type="array">
           <item name="config" xsi:type="array">
               <item name="filter" xsi:type="string">number</item>
               <item name="label" xsi:type="string" translate="true">ID</item>
               <item name="sortOrder" xsi:type="number">10</item>
           </item>
       </argument>
   </column>
    <column name="title">
       <argument name="data" xsi:type="array">
           <item name="config" xsi:type="array">
               <item name="filter" xsi:type="string">text</item>
               <item name="label" xsi:type="string" translate="true">title</item>
               <item name="sortOrder" xsi:type="number">20</item>
           </item>
       </argument>
    </column>
</columns>

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.