wordpress - WordPress 与 PageLines 冲突
问题描述
我注意到更新到 WP 5.5 后,我无法通过 PageLines5 编辑我的 wordpress 页面。
这些是我的网站在尝试编辑页面时出现的错误:
Uncaught ReferenceError: wp is not defined at color-picker.min.js:2
Uncaught TypeError: a(...).wpColorPicker is not a function at editing.js:5
插件“启用 jQuery 迁移助手”对我没有帮助。
解决方案
wordress 更新后,页面编辑器(Pagelines 框架)无法编辑,因为a(...).wpColorPicker is not a function at editing.js
bloc 脚本
解决方案:查看 wp-content/plugins/pl-platform/engine/ui/js/edit.js 中的文件 edit.js ,然后取消压缩文件,最后在之前进行编辑:
.each(function () {
a(this)
.wpColorPicker({
change: function (b, c) {
var d = a(this);
d.val(d.iris("color")).trigger("keyup");
var e = _.debounce(
function () {
d.trigger("blur");
},
300,
{ leading: !1 }
);
e();
},
})
.addClass("is-ready loaded");
})
...
})
而不是(添加 ...hasOwnProperty('wpColorPicker')
.each(function () {
if(a(this).hasOwnProperty('wpColorPicker')) {
a(this)
.wpColorPicker({
change: function (b, c) {
var d = a(this);
d.val(d.iris("color")).trigger("keyup");
var e = _.debounce(
function () {
d.trigger("blur");
},
300,
{ leading: !1 }
);
e();
},
})
.addClass("is-ready loaded");
}
})
...
})
刷新您的页面确保您的文件已更新,我建议删除缓存浏览器完成。它对我有用
推荐阅读
- flutter - 如何从 firestore 获取一些数据并对其进行汇总?
- r - R Plumber 在不同操作系统上的性能
- c# - 如果抛出 InvalidOperationException,如何从 SingleOrDefaultValue 获取值
- php - 如果它们位于同一父位置,如何在另一个项目中调用一个项目的程序类
- sql - SQL 透视/反透视
- html - HTML 元素设置为可见但仍然不可见
- vue.js - 通过插槽传递给组件,该组件发出事件
- lua - 我在使用 LUA 如何转换成整数的最后一个年龄上得到小数位
- c - 如何将 unsigned int 转换为指针并取消引用它?
- mysql - 如何将产品同步到本地应用程序的本地 sql 数据库