错误:“应创建对象DOMDocument。”添加/编辑产品属性时


16

每当我编辑或添加产品属性时,都会收到标题错误

“处理您的请求时出错”

和身体说

"Object DOMDocument should be created."

The error log reads :
" a:4:{i:0;s:37:"Object DOMDocument should be created.";i:1;s:10125:"#0 /home/puffpackage/public_html/vendor/magento/framework/View/Element/UiComponent/Config/Reader.php(95): Magento\Framework\View\Element\UiComponent\Config\DomMerger->getDom()
#1 /home/puffpackage/public_html/vendor/magento/module-ui/Model/Manager.php(261): Magento\Framework\View\Element\UiComponent\Config\Reader->read()
#2 /home/puffpackage/public_html/vendor/magento/module-ui/Model/Manager.php(169): Magento\Ui\Model\Manager->prepare('form_schedule_b...')
#3 /home/puffpackage/public_html/vendor/magento/framework/View/Element/UiComponentFactory.php(139): Magento\Ui\Model\Manager->prepareData('form_schedule_b...')
#4 /home/puffpackage/public_html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(125): Magento\Framework\View\Element\UiComponentFactory->create('form_schedule_b...', NULL, Array)
#5 /home/puffpackage/public_html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(93): Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(Object(Magento\Framework\View\Layout\Data\Structure), 'form_schedule_b...', Array, Object(Magento\Framework\View\Layout\Interceptor))
#6 /home/puffpackage/public_html/vendor/magento/framework/View/Layout/GeneratorPool.php(86): Magento\Framework\View\Layout\Generator\UiComponent->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#7 /home/puffpackage/public_html/vendor/magento/framework/View/Layout.php(327): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#8 /home/puffpackage/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(89): Magento\Framework\View\Layout->generateElements()
#9 /home/puffpackage/public_html/vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout\Interceptor->generateElements()
#10 /home/puffpackage/public_html/vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#11 /home/puffpackage/public_html/vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
#12 /home/puffpackage/public_html/vendor/magento/framework/View/Page/Config.php(166): Magento\Framework\View\Layout\Builder->build()
#13 /home/puffpackage/public_html/vendor/magento/framework/View/Page/Config.php(475): Magento\Framework\View\Page\Config->build()
#14 /home/puffpackage/public_html/vendor/magento/framework/View/Page/Config.php(433): Magento\Framework\View\Page\Config->getElementAttribute('body', 'class')
#15 /home/puffpackage/public_html/vendor/magento/module-catalog/Controller/Adminhtml/Product/Attribute.php(90): Magento\Framework\View\Page\Config->addBodyClass('attribute-popup')
#16 /home/puffpackage/public_html/vendor/magento/module-catalog/Controller/Adminhtml/Product/Attribute/Edit.php(55): Magento\Catalog\Controller\Adminhtml\Product\Attribute->createActionPage(Object(Magento\Framework\Phrase))
#17 /home/puffpackage/public_html/var/generation/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Edit/Interceptor.php(25): Magento\Catalog\Controller\Adminhtml\Product\Attribute\Edit->execute()
#18 /home/puffpackage/public_html/vendor/magento/framework/App/Action/Action.php(102): Magento\Catalog\Controller\Adminhtml\Product\Attribute\Edit\Interceptor->execute()
#19 /home/puffpackage/public_html/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#20 /home/puffpackage/public_html/vendor/magento/module-catalog/Controller/Adminhtml/Product/Attribute.php(72): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#21 [internal function]: Magento\Catalog\Controller\Adminhtml\Product\Attribute->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /home/puffpackage/public_html/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)
#23 /home/puffpackage/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Controller\Adminhtml\Product\Attribute\Edit\Interceptor->___callParent('dispatch', Array)
#24 /home/puffpackage/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\Attribute\Edit\Interceptor), Array, 'adminAuthentica...')
#25 /home/puffpackage/public_html/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))
#26 [internal function]: Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Attribute\Edit\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#27 /home/puffpackage/public_html/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#28 /home/puffpackage/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\Attribute\Edit\Interceptor), Array, 'designLoader')
#29 /home/puffpackage/public_html/vendor/magento/framework/App/Action/Plugin/Design.php(39): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#30 [internal function]: Magento\Framework\App\Action\Plugin\Design->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Attribute\Edit\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#31 /home/puffpackage/public_html/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#32 /home/puffpackage/public_html/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\Attribute\Edit\Interceptor), Array, 'adminMassaction...')
#33 /home/puffpackage/public_html/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Catalog\Controller\Adminhtml\Product\Attribute\Edit\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#34 [internal function]: Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Attribute\Edit\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#35 /home/puffpackage/public_html/vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)
#36 /home/puffpackage/public_html/var/generation/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Edit/Interceptor.php(40): Magento\Catalog\Controller\Adminhtml\Product\Attribute\Edit\Interceptor->___callPlugins('dispatch', Array, Array)
#37 /home/puffpackage/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Product\Attribute\Edit\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#38 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#39 /home/puffpackage/public_html/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)
#40 /home/puffpackage/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#41 /home/puffpackage/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#42 /home/puffpackage/public_html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#43 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#44 /home/puffpackage/public_html/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#45 /home/puffpackage/public_html/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'storeCookieVali...')
#46 /home/puffpackage/public_html/vendor/magento/module-store/Model/Plugin/StoreCookie.php(78): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#47 [internal function]: Magento\Store\Model\Plugin\StoreCookie->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#48 /home/puffpackage/public_html/vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)
#49 /home/puffpackage/public_html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#50 /home/puffpackage/public_html/vendor/magento/framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#51 /home/puffpackage/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#52 /home/puffpackage/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#53 {main}";s:3:"url";s:244:"/puffmin/catalog/product_attribute/new/store/0/product_tab/variations/popup/1/key/5c2a345ed1b7894fdb9bca01f9daba0c242a4451e6b492633a2d909675076f05/?attribute%5Bis_global%5D=1&attribute%5Bfrontend_input%5D=select&set=4&attribute[frontend_label]=";s:11:"script_name";s:10:"/index.php";} "

您能更具体地尝试一下吗?通过管理员或编辑xml文件?
马蒂

在管理页面上,当编辑产品时,它具有可配置的属性,其中包括products属性,我也尝试从属性部分本身对其进行编辑,并且它具有相同的错误。
大卫·亨特

2
您应该在最后的代码中检查var / log / system.log。
xanka

错误日志显示为:[2015-12-16 06:40:32] main.CRITICAL:无法创建目录/ home / puffpackage / public_html / var / generation / Magento / Eav / Model / Entity / Attribute / Config / Reader /。[] []
大卫·亨特

Magento的2.0 CE是否有帮助..
大卫·亨特

Answers:



17

Object DOMDocument should be created.错误的另一个可能原因是该ui_component/your_listing.xml文件下的不可访问文件view/adminhtml/当您要创建Adminhtml Grid并在以下声明时文件夹文件view/adminhtml/layout/your_handle_index.xml

<body>
    <referenceContainer name="content">
        <uiComponent name="your_listing"/>
    </referenceContainer>
</body>

是的,的确,我有这个问题。现在,我继续下一个错误:)。Multumesc!
阿德里安·莫伊萨

1
就我而言,我拼错了 view/adminhtml/
Nahid

在我的情况下,这很有帮助,我在vendor / magento / framework / view / element / UiComponentFactory.php中有一些与UI相关的代码,这些代码本不应该存在的
Asad Ullah,

10

此错误的另一个可能原因是您的类文件夹没有正确的大小写(即小写)。

var / log / system.log:

[2016-02-26 21:19:51] main.CRITICAL: Class Example\Myclass\Block\ShopCategory does not exist [] []
[2016-02-26 21:19:51] main.CRITICAL: Invalid block type: Example\Myclass\Block\ShopCategory [] []

例如,如果名称空间文件夹是“ example”而不是“ Example”,则它在Windows和大多数Mac安装上都可以正常工作,但是会失败,并显示“应创建Object DOMDocument”。Linux上的错误,因为Linux使用区分大小写的文件系统。


Thx提供了进入system.log的提示。对我来说是一个简单的php通知Notice: Undefined index: regalo_mittente in /app/code/Custom/Backend/Helper/Data.php on line 50
LucScu

这应该是第一件事。
Nicolas PERNOT '18

1

最近在模块开发期间,我遇到了同样的错误。就我而言,我发现了真正的错误是:

循环依赖性:Vendor \ Module \ Helper \ Data取决于Vendor \ Module \ Helper \ Bot,反之亦然。

我从 __construct助手方法中(使用一个父类对其进行了重构),错误消失了。因此,我建议您检查代码中的循环依赖关系。

另一种错误:渲染组件时出现致命错误,这是由于从第3方模块调用不存在的类引起的。

据我了解,在组件渲染期间发生致命错误时会引发此类错误,并且与Object DOM Document无关。


0

好吧,如果您已将数据从Magento 1迁移到Magento 2,并且在特定页面上遇到此错误,请执行以下步骤:

如果在特定产品视图页面类别页面或任何cms页面中遇到此错误,请转到该产品/类别或CMS页面编辑部分和goto 设计部分,以及在布局更新XML中( 如果添加了任何块),然后注释该XML代码或删除并清除缓存并检查前端。


0

我也碰到了这个..检查var / log / system.log显示open_basedir限制有效。文件(/ etc / pki / tls / certs)

删除open_basedir限制可解决此问题

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.