Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabled Output of Magento_Review leads to LocalizedException #5663

Closed
wants to merge 5 commits into from
Closed

Disabled Output of Magento_Review leads to LocalizedException #5663

wants to merge 5 commits into from

Conversation

GordonLesti
Copy link
Contributor

If visiting admin/catalog/product/edit and if the output of module Magento_Review is disabled, Magento says Attention Something went wrong.. Problem is a ajax request to http://hostname/admin/mui/index/render/key/foo/?namespace=review_listing&isAjax=true that returns a 500 status code with the following response:

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Object DOMDocument should be created.

Exception #0 (Magento\Framework\Exception\LocalizedException): Object DOMDocument should be created.
#0 /vendor/magento/framework/View/Element/UiComponent/Config/Reader.php(100): Magento\Framework\View\Element\UiComponent\Config\DomMerger->getDom()
#1 /vendor/magento/module-ui/Model/Manager.php(263): Magento\Framework\View\Element\UiComponent\Config\Reader->read()
#2 /vendor/magento/module-ui/Model/Manager.php(166): Magento\Ui\Model\Manager->prepare('review_listing')
#3 /vendor/magento/framework/View/Element/UiComponentFactory.php(144): Magento\Ui\Model\Manager->prepareData('review_listing')
#4 /vendor/magento/module-ui/Controller/Adminhtml/Index/Render.php(30): Magento\Framework\View\Element\UiComponentFactory->create('review_listing')
#5 /var/generation/Magento/Ui/Controller/Adminhtml/Index/Render/Interceptor.php(24): Magento\Ui\Controller\Adminhtml\Index\Render->execute()
#6 /vendor/magento/framework/App/Action/Action.php(102): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->execute()
#7 /vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#8 /vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#9 /vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callParent('dispatch', Array)
#10 /vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Ui\\Cont...', 'dispatch', Object(Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor), Array, 'adminAuthentica...')
#11 /vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#12 /vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#13 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Ui\\Cont...', 'dispatch', Object(Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor), Array, 'adminMassaction...')
#14 /vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#15 /vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#16 /var/generation/Magento/Ui/Controller/Adminhtml/Index/Render/Interceptor.php(52): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callPlugins('dispatch', Array, Array)
#17 /vendor/magento/framework/App/FrontController.php(55): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#18 /vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#19 /vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#20 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#21 /vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#22 /vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#23 /var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#24 /vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#25 /vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\App\Http->launch()
#26 /var/generation/Magento/Framework/App/Http/Interceptor.php(26): Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, Array)
#27 /vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http\Interceptor->launch()
#28 /pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#29 {main}

The problem is that Magento\Framework\View\Element\UiComponent\Config\DomMerger::getDom has an empty domDocument property. With enabled output of module Magento_Review the domDocument property would have the content of review_listing.xml.
This can happen, cause Magento\Framework\View\File\Collector\Decorator\ModuleOutput::getFiles is filtering files that are contained in modules with disabled output.

Magento\Review\Ui\DataProvider\Product\Form\Modifier\Review::modifyMeta should only modify the meta if the output of module Magento_Review is enabled to prevent the behavior from above.

@hostep
Copy link
Contributor

hostep commented Jul 15, 2016

Thanks!

This should hopefully fix #5323

@SchumacherFM
Copy link
Member

We need this urgently please merge it ASAP

@vkorotun vkorotun added bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bugfix and removed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report labels Aug 4, 2016
@sshrewz
Copy link

sshrewz commented Aug 11, 2016

Internal ticket - MAGETWO-56794

@sshrewz sshrewz added the linked label Aug 11, 2016
@vkorotun vkorotun added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development and removed linked labels Aug 22, 2016
@southerncomputer
Copy link
Contributor

Need to implement this with all modules as DI still injects and .xml layouts still override when a module is disabled!

php bin/magento module:disable needs to remove all functionality of the module as if it were uninstalled including setup_database version checks !

@Ctucker9233
Copy link

Is this going to be merged soon?

@miakusha
Copy link
Contributor

miakusha commented Oct 3, 2016

Closed as already fixed in #6704
b046944

@miakusha miakusha closed this Oct 3, 2016
mmansoor-magento pushed a commit that referenced this pull request Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Component: Customer Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: accept
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants