[整理]Magento2 开发中遇到的错误以及解决方案 - Errors Encountered in Magento2 Development and Their Solutions

下面记录了一些我在二次开发Magento2是所遇到的错误、错误原因以及解决方案:

  1. Object DOMDocument should be created

type: report

日志摘要:

1
2
3
4
5
1 a:4:{i:0;s:37:"Object DOMDocument should be created.";i:1;s:7698:"#0 D:\www\prince\prince-dev\vendor\magento\framework\View\Element\UiComponent\Config\Reader.php(95): Magento\Framework\View\Element\UiComponent\Config\DomMerger->getDom()
2 #1 D:\www\prince\prince-dev\vendor\magento\module-ui\Model\Manager.php(258): Magento\Framework\View\Element\UiComponent\Config\Reader->read()
3 #2 D:\www\prince\prince-dev\vendor\magento\module-ui\Model\Manager.php(166): Magento\Ui\Model\Manager->prepare('bcn_news_edit_t...')
4 #3 D:\www\prince\prince-dev\vendor\magento\framework\View\Element\UiComponentFactory.php(144): Magento\Ui\Model\Manager->prepareData('bcn_news_edit_t...')
5 #4 D:\www\prince\prince-dev\vendor\magento\framework\View\Layout\Generator\UiComponent.php(124): Magento\Framework\View\Element\UiComponentFactory->create('bcn_news_edit_t...', NULL, Array)

原因: Layout中的某个Block没有找到指定的Class,或者说指定的Class不存在

解决方案: 新增对应于这个Block的Class,或者从Layout中删除Block节点

Built with Hugo
主题 StackJimmy 设计