WordPress 新建文章突然打不开了
禁用插件、清空缓存等无法解决问题
复制出来的错误信息是:
TypeError: Cannot read property 'MediaFrame' of undefined
at Object.wp.media (http://*******.com/wp-includes/js/media-models.min.js?ver=5.1.2:1:1062)
at new t (http://*******.com/wp-includes/js/dist/edit-post.min.js?ver=3.1.11:12:6517)
at zf (http://*******.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:69:258)
at Mf (http://*******.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:87:4)
at ph (http://*******.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:98:474)
at eg (http://*******.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:125:307)
at fg (http://*******.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:126:168)
at wc (http://*******.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:138:237)
at fa (http://*******.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:137:115)
at gg (http://*******.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:135:196)
网上的解决方案都试过了一遍不管用,浏览器 Console 看了都是问题,很多 JS 文件报 403,如果直接访问 js 的 url 而不加 ? 后面的参数是可以正常打开的
想了下应该是 CDN 的锅,果然,打开参数过滤就好了
回想了一下,应该是之前动态压缩被我关掉了,现在 CDN 正好过期刷新了导致的问题