- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在测试升级到 Magento 2.4,但出现以下错误。我读过此错误可能与自定义扩展中缺少的标题属性有关。为了尝试隔离问题,我从/app/code/文件夹中删除了所有扩展,然后运行 upgrade ,再次编译过程,但即使删除了所有扩展,问题仍然存在。
知道如何调试吗?
1 exception(s):
Exception #0 (LogicException): Could not create an acl object: Invalid Document
Element 'resource': The attribute 'title' is required but missing.
Line: 13
Exception #0 (LogicException): Could not create an acl object: Invalid Document
Element 'resource': The attribute 'title' is required but missing.
Line: 13
<pre>#1 Magento\Framework\Acl\Builder\Proxy->getAcl() called at [vendor/magento/module-backend/Model/Auth/Session.php:229]
#2 Magento\Backend\Model\Auth\Session->processLogin() called at [vendor/magento/module-backend/Model/Auth.php:165]
#3 Magento\Backend\Model\Auth->login() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#4 Magento\Backend\Model\Auth\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#5 Magento\Backend\Model\Auth\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#6 Magento\Backend\Model\Auth\Interceptor->___callPlugins() called at [generated/code/Magento/Backend/Model/Auth/Interceptor.php:26]
#7 Magento\Backend\Model\Auth\Interceptor->login() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:205]
#8 Magento\Backend\App\Action\Plugin\Authentication->_performLogin() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:157]
#9 Magento\Backend\App\Action\Plugin\Authentication->_processNotLoggedInUser() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:125]
#10 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#11 Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#12 Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->___callPlugins() called at [generated/code/Magento/Backend/Controller/Adminhtml/Index/Index/Interceptor.php:39]
#13 Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:186]
#14 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:118]
#15 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#16 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#17 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#18 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#19 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#20 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#21 Magento\Framework\App\Bootstrap->run() called at [sitemaps/speedcrete/htdocs/index.php:44]
最佳答案
使用 ./vendor/magento/framework/Acl/etc/acl_merged.xsd
在开发模式下验证合并的 ACL。属性 title
是必需的:
<xs:attribute name="title" type="typeTitle" use="required" />
尝试在 ./vendor/magento/framework/Config/Reader/Filesystem.php:169
中设置断点并获取合并的 XML:
$configMerger->getDom()->saveXML();
然后使用在线验证器,如 https://www.freeformatter.com/xml-validator-xsd.html根据 XSD 验证您的 XML(使用 ./vendor/magento/framework/Acl/etc/acl.xsd
和必需的 title
属性)。
就我而言,我禁用了一些 magento 模块(Magento_InventoryApi
、Magento_InventoryInStorePickupApi
):
<resource id="Magento_InventoryApi::inventory" title="Inventory" ... />
<resource id="Magento_InventoryInStorePickupApi::inStorePickup" title="In-Store Pickup" ... />
但我没有禁用依赖模块(Magento_InventoryInStorePickupSalesApi
):
<resource id="Magento_InventoryApi::inventory">
<resource id="Magento_InventoryInStorePickupApi::inStorePickup">
<resource id="Magento_InventoryInStorePickupApi::notify_orders_are_ready_for_pickup" title="Notify Orders Are Ready For Pickup" ... />
</resource>
</resource>
所以,我合并的 ACL 是这样的:
<resource id="Magento_InventoryApi::inventory">
<resource id="Magento_InventoryInStorePickupApi::inStorePickup">
<resource id="Magento_InventoryInStorePickupApi::notify_orders_are_ready_for_pickup"
title="Notify Orders Are Ready For Pickup" translate="title" sortOrder="30"/>
</resource>
</resource>
对于 resource
节点没有必需的属性 title
。
关于magento2 - 无法访问 Magento 2.4.0 后端无法创建 acl 对象 : Invalid Document,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63301380/
我正在尝试计算 iFrame 的高度,但不明白为什么 document.body.offsetHeight + document.body.bottomMargin 不等于 document.docu
我正在使用 Node/Mongoose/MongoDB 并尝试构建一个轮询应用程序。一个关键需求是跟踪单个用户对同一民意调查的响应如何随时间变化(他们一遍又一遍地进行同一民意调查)。 我有一个用户模型
首先,我不是普通的博主,我很困惑。如果我的问题不符合要求,请指导我。我会努力改进的。 我已提交 Microsoft Code Review 的 Microsoft CRM 插件。我是 JavaScri
谁能解释为什么使用类似的东西: gci -force "\\computername\c$\users\username\Documents" -recurse 或者 gci -force "\\co
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, over
这个问题已经有答案了: What is the (function() { } )() construct in JavaScript? (28 个回答) 已关闭 6 年前。 说实话,一开始我以为我可
document.getElementsByTagName("*") 适用于 IE/Firefox/Opera,但不适用于 Chrome 和 Safari。 document.all 适用于 IE/C
这个问题在这里已经有了答案: What is the difference between Document and document in JavaScript? (2 个答案) 关闭 8 年前。
我以某种方式发现将事件监听器添加到文档的行为有点奇怪。虽然向 HTMLElements 添加监听器工作正常,但向文档添加监听器不起作用。但奇怪的是,使用 jQuery 可以让它工作。 那么有人可以解释
谁能告诉我这两个 JavaScript 命令之间的区别? 这两个跨主要浏览器的兼容性是什么?我知道 documentElement 与大多数浏览器兼容。 谢谢 最佳答案 document.docume
什么时候应该使用 document.all 与 document.getElementById? 最佳答案 document.all 是 Microsoft 对 W3C 标准的专有扩展。 getEle
当升级到 react-native 0.61.2 时,这个问题出现了。我做到了从手机中删除了 apk 和自动链接使用 react-native link 然后 react-native run-and
当升级到 react-native 0.61.2 时,这个问题出现了。我做到了从手机中删除了 apk 和自动链接使用 react-native link 然后 react-native run-and
我将收到 tungstenite::Message ,它将包含来自客户端的bson文档。我可以将tungstenite::Message转换为Vec,但是如何在服务器端将其转换回 bson::docu
我这里有一个简单的疑问: 文档对象范围位于浏览器选项卡内:我的意思是如果我设置document.tab1 ='tab1' 在一个浏览器选项卡中 它在其他选项卡中不可用。 但是 document.coo
我经常使用并看到推荐的 dom 访问结构,例如这样动态地将内容添加到页面: loader = document.createElement('script'); loader.src = "myurl
我对 JQuery 还很陌生。我正在使用this JQuery 函数在元素上显示工具提示。 我根据我的需要(在这个社区的帮助下)以这种方式编辑了代码: $(document).ready(functi
我想知道哪个是运行js代码的正确方法,该代码根据窗口高度计算垂直菜单的高度并按时设置,不晚不早。 我正在使用 document.ready 但它并没有真正帮助我解决这个问题,它有时没有设置,我必须重新
我正在浏览一个 js 文件并发现这个声明var dataobj=document.all? document.all.id_name : document.getElementById("id_nam
想知道何时使用,这适用于什么浏览器? if (document.all&&document.getElementById) { // Some code block } 最佳答案 我认为没有任何重要的
我是一名优秀的程序员,十分优秀!