Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento 2.1.1 Admin content pages not loading handle not registered

In my Magento 2.1.1 shop with 2 custom modules some of my admin content pages are not loading. (Widget, theme and shedule are loading fine - others not :-( )

For all of these I get "Not registered handle" error: Not registered handle cms_page_listing_data_source Not registered handle cms_block_listing_data_source Not registered handle design_config_listing_data_source

While all of these do exist in the xml files. app/vendor/magento/module-cms/view/adminhtml/ui_component/cms_page_listing.xml ...

Seems like this first occorred when I added the "demo" store option to the shop ... but I'm not sure.

Any help would be great!

Thanks Stijn

like image 447
user3415805 Avatar asked Sep 29 '16 07:09

user3415805


2 Answers

The problem here is that someone defined a handle in the etc/adminhtml/di.xml

search for something like this

<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
    <arguments>
        <argument name="collections" xsi:type="array">
            <item name="NameOfHandle" xsi:type="string">Vendor\Module\Model\ResourceModel\Something\Collection</item>
        </argument>
    </arguments>
</type>
<virtualType name="Vendor\Module\Model\ResourceModel\Something\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
    <arguments>
        <argument name="mainTable" xsi:type="string">NameOfTable</argument>
        <argument name="resourceModel" xsi:type="string">Vendor\Module\Model\ResourceModel\Something</argument>
    </arguments>
</virtualType>

Do not search for the handle that he can not find. Just go over etc/adminhtml/di.xml in your modules and search for

<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">

Move that bit of code to etc/di.xml instead of etc/adminhtml/di.xml

like image 127
CompactCode Avatar answered Oct 21 '22 08:10

CompactCode


Thanks - changing permissions didn't help.

But found the problem and solution: I had the di.xml splitted over etc/di.xml and etc/adminhtml/di.xml ==> this is wrong and causes failure. Now merged back into 1 di.xml and errors are solved.

:-)

like image 38
user3415805 Avatar answered Oct 21 '22 10:10

user3415805



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!