Closed hidonet closed 4 years ago
Does anyone have any pointers on how to solve this?
If you delete the following block from the UI Component xml file, things appear to be working normally for me:
`
<argument name="namespace" xsi:type="string">prince_faq_index</argument>
</argument>`
@lamda yes. it's worked for me too. Thanks.
delete is not good way. Add di.xml for whitelist class instead
Could you explain what you mean by that? Why is not good? And any pointers on how one could add that to di.xml?
Why do we need to delete these rows? What is changed in the last version of Magento?
Or just implement Magento\Framework\Data\OptionSourceInterface
for that Context class
just add to app/etc/di.xml
<item name="2" xsi:type="string">Magento\Framework\View\Element\UiComponent\ContextInterface</item>
<type name="Magento\Framework\View\Element\UiComponent\Argument\Interpreter\ConfigurableObject">
<arguments>
<argument name="classWhitelist" xsi:type="array">
<item name="0" xsi:type="string">Magento\Framework\Data\OptionSourceInterface</item>
<item name="1" xsi:type="string">Magento\Framework\View\Element\UiComponent\DataProvider\DataProviderInterface</item>
<item name="2" xsi:type="string">Magento\Framework\View\Element\UiComponent\ContextInterface</item>
</argument>
</arguments>
</type>
@lamda got the right fix for it. You can find the file in your module -> etc/view/adminhtml/ui_component
just add to app/etc/di.xml
<item name="2" xsi:type="string">Magento\Framework\View\Element\UiComponent\ContextInterface</item>
<type name="Magento\Framework\View\Element\UiComponent\Argument\Interpreter\ConfigurableObject"> <arguments> <argument name="classWhitelist" xsi:type="array"> <item name="0" xsi:type="string">Magento\Framework\Data\OptionSourceInterface</item> <item name="1" xsi:type="string">Magento\Framework\View\Element\UiComponent\DataProvider\DataProviderInterface</item> <item name="2" xsi:type="string">Magento\Framework\View\Element\UiComponent\ContextInterface</item> </argument> </arguments> </type>
Thank You its working!!!
I added this to an over ride di.xml file and its resolved the issue. I wasnt sure if app/etc/di.xml would be over ridden in future core magento updates. Can someone explain a little about what the above is doing?
All admin links of this extension returning this error.
1 exception(s): Exception #0 (InvalidArgumentException): Class argument is invalid: Magento\Framework\View\Element\UiComponent\Context
Exception #0 (InvalidArgumentException): Class argument is invalid: Magento\Framework\View\Element\UiComponent\Context