javascript - 错误:不匹配的匿名定义()模块 Magento 2.3
问题描述
我对客户 Magento 2.3 商店有疑问。在控制台中我看到 js 错误“错误:不匹配的匿名定义()模块:函数(d){return c(d,a,b),d.mobile}”。我已经阅读了一些关于问题的主题,它看起来像调用未“定义”的函数/模块。
这是导致每个前端页面出现问题的代码:
<script>
require.config({
map: {
'*': {
wysiwygAdapter: 'mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter'
}
}
});
</script>
代码从以下位置加载:
/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml
这是我尝试过的:
define('config', function () {
require.config({
map: {
'*': {
wysiwygAdapter: '<?php /* @noEscape */ echo $block->getWysiwygAdapterPath(); ?>'
}
}
});
});
当我使用定义错误消失但我不确定该解决方案时。我有第二个 magento 2.3 全新安装,有相同的 magento 文件,但不是每页都加载一个,因此必须从某些模块/加载器添加客户端商店脚本。这是解决这个问题的正确方法吗?
非常感谢您的帮助。祝你今晚愉快!
解决方案
推荐阅读
- android - 如何访问清单中声明的组件实例(广播接收器)
- java - 更新和删除不适用于使用 JAVAFx 的 mysql 数据库
- canvas - 将两个图像的差异绘制到画布上
- active-directory - 具有单向信任的跨林 LDAP 查询
- c# - 具有依赖注入的 DbProviderFactory
- c++ - 特征值设置为零所有接近零的值
- c# - 为什么此代码会引发 IndexOutOfBounds 错误?
- sockets - 通过侦听多个 UDP 套接字来避免数据包类型检查
- c# - 需要通过构造函数或其他方式从 Razor 过滤方法访问 HttpContext
- java - 获得焦点时如何从JSlider中删除虚线?