0

After install extension we get issue: Not registered handle

mpimageoptimizer_grid_data_source

Below is code etc/di.xml:

<?xml version="1.0"?>
<!--
/**
 * Mageplaza
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Mageplaza.com license that is
 * available through the world-wide-web at this URL:
 * https://www.mageplaza.com/LICENSE.txt
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category    Mageplaza
 * @package     Mageplaza_ImageOptimizer
 * @copyright   Copyright (c) Mageplaza (https://www.mageplaza.com/)
 * @license     https://www.mageplaza.com/LICENSE.txt
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="mpimageoptimizer_grid_data_source" xsi:type="string">mpimageoptimizer_grid_collection</item>
            </argument>
        </arguments>
    </type>
    <virtualType name="mpimageoptimizer_grid_collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
        <arguments>
            <argument name="mainTable" xsi:type="string">mageplaza_image_optimizer</argument>
            <argument name="resourceModel" xsi:type="string">Mageplaza\ImageOptimizer\Model\ResourceModel\Image</argument>
        </arguments>
    </virtualType>
    <type name="Magento\Framework\Console\CommandList">
        <arguments>
            <argument name="commands" xsi:type="array">
                <item name="mpimageoptimizer_command_optimize" xsi:type="object">Mageplaza\ImageOptimizer\Console\Command\Optimize</item>
                <item name="mpimageoptimizer_command_scan" xsi:type="object">Mageplaza\ImageOptimizer\Console\Command\Scan</item>
            </argument>
        </arguments>
    </type>
</config>

Any solution?

Your Answer

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

Browse other questions tagged or ask your own question.