WordPress后台编辑页面时Elementor出现templates_empty_title未定义错误求助
解决Elementor模板库报错:Uncaught TypeError: Cannot read properties of undefined (reading 'templates_empty_title')
报错详情:
Uncaught TypeError: Cannot read properties of undefined (reading 'templates_empty_title') at ElementorCommonApp.translate (common.min.js?ver=3.15.3:3:159255) at Editor.translate (editor.min.js?ver=3.15.3:3:568743) at ./assets/admin/src/template-library/LibraryTemplatesEmpty.js (elementor-modal.js:1:14611) at n (elementor-modal.js:1:110) at ./assets/admin/src/template-library/LibraryCollection.js (elementor-modal.js:1:5481) at n (elementor-modal.js:1:110) at ./assets/admin/src/template-library/LibraryLayoutView.js (elementor-modal.js:1:11415) at n (elementor-modal.js:1:110) at ./assets/admin/src/template-library/Component.js (elementor-modal.js:1:2039) at n (elementor-modal.js:1:110)
以下是逐步排查解决方法:
强制刷新Elementor资源缓存
进入WordPress后台,打开「Elementor」→「工具」→「常规」标签页,依次点击「重新生成CSS」和「同步库」,完成后用快捷键强制刷新浏览器(Windows:Ctrl+F5;Mac:Cmd+Shift+R)。排查插件冲突与版本兼容
- 先禁用所有非Elementor官方的插件,刷新编辑器看报错是否消失。如果恢复正常,再逐个启用插件,找到引发冲突的那个并更新或替换。
- 确认Elementor版本(当前为3.15.3)和WordPress核心版本匹配,建议直接升级到Elementor最新稳定版,旧版本可能存在已知的翻译字符串加载bug。
修复缺失/损坏的语言文件
这个报错是因为Elementor无法读取templates_empty_title这个翻译字符串,大概率是语言文件问题:- 进入「设置」→「常规」,确认站点语言设置正确,比如简体中文。
- 打开Elementor的「设置」→「高级」标签页,勾选「加载默认语言文件」,保存设置后刷新页面。
- 如果还是不行,通过FTP或主机控制面板进入
wp-content/languages/plugins目录,删除所有以elementor-开头的.mo和.po文件,然后回到后台重新更新Elementor插件,系统会自动重新下载对应语言包。
检查服务器文件权限
确保wp-content目录及所有子目录权限设置为755,文件权限设置为644,避免因权限不足导致Elementor无法读取必要的资源文件。重置Elementor配置(极端方案)
如果以上方法都无效,进入「Elementor」→「工具」→「重置」标签页,点击「重置Elementor」。注意:重置前最好备份当前Elementor的模板和设置,避免数据丢失。
内容的提问来源于stack exchange,提问作者Francesco Gallo
相关产品推荐
相关产品推荐

