8

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

7 Answers 7

14

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

2
  • Move that bit of code to etc/di.xml instead of etc/adminhtml/di.xml Its worked for me.
    – ssatish4u
    Commented Jan 29, 2021 at 10:18
  • this worked for me, magento version 2.3.3 i'm doing this for training purposes
    – jyonkheel
    Commented Oct 22, 2021 at 4:24
7

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.

:-)

2
  • In my custom module, I have only one di.xml in etc/adminhtml/di.xml, but still, there seems the error
    – senthil
    Commented Jun 21, 2018 at 14:16
  • I have merged the etc/adminhtml/di.xml into etc/di.xml, but the functionality does not working <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory" shared="true"> <arguments> <argument name="collections" xsi:type="array"> <item name="sales_order_grid_data_source" xsi:type="string">Gtwo\Assignorder\Model\ResourceModel\Order\Grid\Collection</item> </argument> </arguments> </type> I have merged this to etc/di.xml
    – senthil
    Commented Jun 25, 2018 at 9:18
0

I came across the same issue and my problems was related to file ownsership. Your problem maybe different from mine but I'm sharing my experience just in case it may help you or someone else. In browser inspector console error specified was:

Failed to load resource: the server responded with a status of 403 (Forbidden)

so files like Magento_Ui/js/grid/search/search or Magento_Ui/js/grid/massactions were not being loaded because current file owner didn't have rightful permissions to run webs service. I consulted Magent Devdocs and resolved the permission issue.

0

Magento uses composer.js to enable and disable modules. If you're installing new modules, basically let Magento know using Shell

 php bin/magento setup:upgrade
 php bin/magento module:enable Namespace_Module
 php bin/magento setup:static-content:deploy
 php bin/magento cache:flush

Then to check if the system has enabled your custom module, type in shell

php bin/magento module:status

This will print all your modules, by status (enabled, disabled)

You could even check your modules status first before doing all that, although it wont hurt to do it too.

0

What worked for me: I moved etc/adminhtml/acl.xml to etc/acl.xml

0

Delete the file di.xml inside the folder etc/adminhtml in your custom modules.

0

I use php bin/magento setup:di:compile and problem was removed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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