简体   繁体   English

Magento 2 cms 后端 javascript 错误 Uncaught SyntaxError: Invalid or unexpected token

[英]Magento 2 cms backend javascript error Uncaught SyntaxError: Invalid or unexpected token

Suddenly I am having javascript error and cannot edit any cms page (cms/page/edit/page_id/45) or block.突然出现 javascript 错误,无法编辑任何 cms 页面 (cms/page/edit/page_id/45) 或块。 I have been trying to solve this for the past week with no success.过去一周我一直试图解决这个问题,但没有成功。 I have also tried removing the modules that I have installed recently.我还尝试删除最近安装的模块。

I did not touch any core files and I have updated file permissions but still get this error below in chrome console from the core static files我没有触及任何核心文件,我已经更新了文件权限,但仍然在 chrome 控制台中从核心 static 文件中收到此错误

VM6148:68 Uncaught SyntaxError: Invalid or unexpected token
at template (template.js:79:36)
at render (template.js:140:24)
at iterate (template.js:236:33)
at Function._.each._.forEach (underscore.js:150:9)
at Object.template (template.js:206:15)
at UiClass.initConfig (class.js:89:28)
at UiClass._super (wrapper.js:106:35)
at UiClass.initConfig (abstract.js:123:18)
at UiClass.initConfig (wrapper.js:109:34)
at UiClass._super (wrapper.js:106:35)

Image showing spinner and javascript error图像显示微调器和 javascript 错误

In my case, it was a database issue due to js injection.就我而言,这是由于 js 注入导致的数据库问题。 Patching a 3rd party extension fixed the issue.修补第 3 方扩展解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM