Wordpress编辑器JS错误“TypeError:无法读取属性'获取'未定义”

The Issue: When editing pages or posts, tinymce doesn't load because of this error.

editor.min.js?ver=4.7.3:1 Uncaught TypeError: Cannot read property 'get' of undefined
    at Object.d [as go] (editor.min.js?ver=4.7.3:1)
    at HTMLAnchorElement.<anonymous> (editor.js?ver=4.7.3:43)
    at HTMLAnchorElement.dispatch (jquery.js?ver=1.12.4:3)
    at HTMLAnchorElement.r.handle (jquery.js?ver=1.12.4:3)
    at Object.trigger (jquery.js?ver=1.12.4:3)
    at Object.a.event.trigger (jquery-migrate.min.js?ver=1.4.1:2)
    at HTMLAnchorElement.<anonymous> (jquery.js?ver=1.12.4:3)
    at Function.each (jquery.js?ver=1.12.4:2)
    at a.fn.init.each (jquery.js?ver=1.12.4:2)
    at a.fn.init.trigger (jquery.js?ver=1.12.4:3)

Install Notes:

  1. Wordpress 4.7.3
  2. Church & Events Theme (Latest Version, fresh installed)
  3. All Plugins up to date

Plugins Installed (All Deactivated)

+-------------------------------+----------+--------+---------+
| name                          | status   | update | version |
+-------------------------------+----------+--------+---------+
| akismet                       | inactive | none   | 3.3     |
| check-email                   | inactive | none   | 0.5.2   |
| contact-form-7                | inactive | none   | 4.7     |
| duplicate-post                | inactive | none   | 3.2     |
| duplicator                    | inactive | none   | 1.2.4   |
| easy-wp-smtp                  | inactive | none   | 1.2.5   |
| gravityforms                  | inactive | none   | 1.9.19  |
| groupsengine_plugin           | inactive | none   | 1.0.9   |
| hello                         | inactive | none   | 1.6     |
| iwp-client                    | inactive | none   | 1.6.3.2 |
| layerslider                   | inactive | none   | 6.3.0   |
| limit-login-attempts          | inactive | none   | 1.7.1   |
| login-security-solution       | inactive | none   | 0.56.0  |
| vamtam-love-it                | inactive | none   | 1.0.0   |
| wysija-newsletters            | inactive | none   | 2.7.9   |
| wp_migration-master           | inactive | none   | 1.2     |
| prayerengine_plugin           | inactive | none   | 1.7.5   |
| seamless-donations            | inactive | none   | 4.0.20  |
| seriesengine_plugin           | inactive | none   | 1.8.4   |
| the-events-calendar           | inactive | none   | 4.4.5   |
| the-events-calendar-filterbar | inactive | none   | 4.4     |
| events-calendar-pro           | inactive | none   | 4.4.5   |
| vamtam-push-menu              | inactive | none   | 2.0.11  |
| vamtam-sermons                | inactive | none   | 1.1.0   |
| varnish-http-purge            | inactive | none   | 4.1     |
| woocommerce                   | inactive | none   | 3.0.3   |
| wordpress-importer            | inactive | none   | 0.6.3   |
| wp-database-backup            | inactive | none   | 4.3.7   |
| wp-retina-2x                  | inactive | none   | 4.8.0   |
+-------------------------------+----------+--------+---------+

Debugging:

  1. Disabled all plugins
  2. Fresh install of Theme
  3. Fresh install of wordpress
  4. Switched to default theme (no more error)
  5. Contacted theme author (said they could not reproduce)

Additional Notes: The only thing I can think of is its something in the db itself that's causing the issue? Are there any other debugging steps I can try?

I'm using this same theme on other site and it doesn't have the error. So its something specific to the site in question. But a fresh wordpress install, fresh theme, and no plugins puts me at a loss as to how to track it down. Thanks in advance for any tips/help!

Updated 4/19/17 On a whim I started with a fresh wordpress install, with only the church and event theme installed. No errors. So one by one I copied the tables from the production site to the new wordpress install using this query

DROP TABLE IF EXISTS dev_db.wp_users;
CREATE TABLE dev_db.wp_users LIKE production_db.wp_users;
INSERT INTO dev_db.wp_users SELECT * FROM production_db.wp_users;

After copying each table, I refreshed the page editor to see if the error happened. As soon as I copied the wp_users and wp_usermeta tables the error happened. So something in one of those tables is causing a js error on the front end? Hmmm..

douhuan6157
douhuan6157 谢谢大家的帮助!我正在敲打那个。
3 年多之前 回复
douyun1950
douyun1950 很高兴它成功了!这是一个简单的解决方案!
3 年多之前 回复
douniewei6346
douniewei6346 很好的建议。当我这样做时,它不会让我保存,因为我的用户没有昵称(idk如何,因为它是必需的?)。一旦我输入昵称,错误便消失了。去了生产现场并做了同样的事情,并在那里修复了它。哇,因为没有昵称,这是多么奇怪的错误!
3 年多之前 回复
duanjianshen4871
duanjianshen4871 这是一个有趣的问题。使用您的开发工具“暂停异常”,然后您可以让开发工具“漂亮地打印”缩小的脚本,以帮助理清正在发生的事情。由于它似乎与用户表绑定,并且在您登录时清楚显示,您是否尝试通过WP仪表板进入用户记录/配置文件并点击“保存”,以使其(可能)重写某些您个人资料的相关记录?而且,我可能会将已知的“OK”记录与“Bad”记录进行比较。我猜这可能是某些元记录丢失/未正确设置。
3 年多之前 回复
douyun8885
douyun8885 表有相同的编码吗?和相同的数据库引擎?
3 年多之前 回复
dsk49208
dsk49208 我真的无法理解这个问题,但您是否尝试使用工作服务器的相同文件替换特定文件?
3 年多之前 回复
dongtang6775
dongtang6775 它在/wp-admin/js/editor.min.js中出错。所有插件都被禁用,错误仍然存​​在,所以我不确定它的插件是否相关?有关新信息,请参阅帖子。
3 年多之前 回复
doujingya1166
doujingya1166 是否有任何特定的代码块触发此错误?这个“编辑器”在哪个插件中?或究竟是什么
3 年多之前 回复
doushi9444
doushi9444 你有没有更新任何插件?所有插件在其他站点(有效)和新站点中是否具有相同的版本?即使您说您尝试停用所有插件..
3 年多之前 回复
dongnaigu2052
dongnaigu2052 是的我已经做到了。我也在不同的环境中测试过它。Linux服务器和Windows开发。每当我从生产站点获得数据库时就会发生错误。
3 年多之前 回复
doubianyan9749
doubianyan9749 您是否尝试过清除缓存?或者使用其他浏览器?
3 年多之前 回复

1个回答



我的用户没有昵称是造成问题的原因。 转到“您的个人资料”输入昵称并保存修复问题。 </ p>
</ div>

展开原文

原文

My user not having a nickname is what was causing the issue. Going to 'Your Profile' entering a nickname and saving fixed the issue.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐