mageprince / magento2-FAQ

This module adds an easy way to use FAQ Section to your Magento store with jQuery Accordion. In this module, admin can add and update FAQ. Admin can also create FAQ group with group icon.
57 stars 37 forks source link

Magento 2.3.3 Admin issue #23

Closed hidonet closed 4 years ago

hidonet commented 4 years ago

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

#1 Magento\Framework\Data\Argument\InterpreterInterface\Proxy->evaluate() called at [vendor/magento/framework/Data/Argument/Interpreter/Composite.php:61]
#2 Magento\Framework\Data\Argument\Interpreter\Composite->evaluate() called at [vendor/magento/module-ui/Config/Data.php:164]
#3 Magento\Ui\Config\Data->evaluateComponentArguments() called at [vendor/magento/module-ui/Config/Data.php:111]
#4 Magento\Ui\Config\Data->initData() called at [vendor/magento/module-ui/Config/Data.php:136]
#5 Magento\Ui\Config\Data->get() called at [vendor/magento/framework/View/Layout/Reader/UiComponent.php:100]
#6 Magento\Framework\View\Layout\Reader\UiComponent->interpret() called at [vendor/magento/framework/View/Layout/ReaderPool.php:105]
#7 Magento\Framework\View\Layout\ReaderPool->interpret() called at [vendor/magento/framework/View/Layout/Reader/Container.php:89]
#8 Magento\Framework\View\Layout\Reader\Container->interpret() called at [vendor/magento/framework/View/Layout/ReaderPool.php:105]
#9 Magento\Framework\View\Layout\ReaderPool->interpret() called at [vendor/magento/framework/View/Page/Config/Reader/Body.php:68]
#10 Magento\Framework\View\Page\Config\Reader\Body->interpret() called at [vendor/magento/framework/View/Layout/ReaderPool.php:105]
#11 Magento\Framework\View\Layout\ReaderPool->interpret() called at [vendor/magento/framework/View/Layout.php:325]
#12 Magento\Framework\View\Layout->generateElements() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:89]
#13 Magento\Framework\View\Layout\Interceptor->generateElements() called at [vendor/magento/framework/View/Layout/Builder.php:129]
#14 Magento\Framework\View\Layout\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Page/Builder.php:55]
#15 Magento\Framework\View\Page\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Layout/Builder.php:65]
#16 Magento\Framework\View\Layout\Builder->build() called at [vendor/magento/framework/View/Page/Config.php:224]
#17 Magento\Framework\View\Page\Config->build() called at [vendor/magento/framework/View/Page/Config.php:247]
#18 Magento\Framework\View\Page\Config->getTitle() called at [vendor/mageprince/module-faq/Controller/Adminhtml/FaqGroup/Index.php:61]
#19 Prince\Faq\Controller\Adminhtml\FaqGroup\Index->execute() called at [generated/code/Prince/Faq/Controller/Adminhtml/FaqGroup/Index/Interceptor.php:24]
#20 Prince\Faq\Controller\Adminhtml\FaqGroup\Index\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
#21 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/module-backend/App/AbstractAction.php:231]
#22 Magento\Backend\App\AbstractAction->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#23 Prince\Faq\Controller\Adminhtml\FaqGroup\Index\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#24 Prince\Faq\Controller\Adminhtml\FaqGroup\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [app/code/WeltPixel/Backend/Plugin/Utility.php:76]
#25 WeltPixel\Backend\Plugin\Utility->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#26 Prince\Faq\Controller\Adminhtml\FaqGroup\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:143]
#27 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#28 Prince\Faq\Controller\Adminhtml\FaqGroup\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#29 Prince\Faq\Controller\Adminhtml\FaqGroup\Index\Interceptor->___callPlugins() called at [generated/code/Prince/Faq/Controller/Adminhtml/FaqGroup/Index/Interceptor.php:39]
#30 Prince\Faq\Controller\Adminhtml\FaqGroup\Index\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:159]
#31 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:99]
#32 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#33 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#34 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#35 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#36 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:137]
#37 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#38 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:40]
lamda commented 4 years ago

Does anyone have any pointers on how to solve this?

lamda commented 4 years ago

If you delete the following block from the UI Component xml file, things appear to be working normally for me:

`

Magento\Framework\View\Element\UiComponent\Context
    <argument name="namespace" xsi:type="string">prince_faq_index</argument>
</argument>`
hidonet commented 4 years ago

@lamda yes. it's worked for me too. Thanks.

mrtuvn commented 4 years ago

delete is not good way. Add di.xml for whitelist class instead

lamda commented 4 years ago

Could you explain what you mean by that? Why is not good? And any pointers on how one could add that to di.xml?

shinesoftware commented 4 years ago

Why do we need to delete these rows? What is changed in the last version of Magento?

ilnytskyi commented 4 years ago

Or just implement Magento\Framework\Data\OptionSourceInterface for that Context class

rustavellyne commented 4 years ago

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>
DylanHopman commented 3 years ago

@lamda got the right fix for it. You can find the file in your module -> etc/view/adminhtml/ui_component

jithutj commented 3 years ago

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!!!

virtualLast commented 2 years ago

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?