更新4.3.2后,网站的wpbakery page builder里的文章展示工具错误了

- 4 年 前

图一是之前正常时的状态,图二是启动wpjam后页面预览时前台的样子,图三是页面编辑里用的小插件的展示,图四是启动插件后前台的显示。
测试连接:https://www.s-fengshui.com/foshiyuyue/
那段错误提示是:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed in /www/admin/www.s-fengshui.com_80/wwwroot/wp-includes/class-wp-hook.php on line 287 and exactly 2 expected in /www/admin/www.s-fengshui.com_80/wwwroot/wp-content/plugins/wpjam-basic/public/wpjam-posts.php:673 Stack trace: #0 /www/admin/www.s-fengshui.com_80/wwwroot/wp-includes/class-wp-hook.php(287): {closure}('') #1 /www/admin/www.s-fengshui.com_80/wwwroot/wp-includes/plugin.php(206): WP_Hook->apply_filters('', Array) #2 /www/admin/www.s-fengshui.com_80/wwwroot/wp-content/plugins/js_composer/include/params/vc_grid_item/attributes.php(357): apply_filters('get_the_excerpt', '') #3 /www/admin/www.s-fengshui.com_80/wwwroot/wp-includes/class-wp-hook.php(287): vc_gitem_template_attribute_post_excerpt('', '') #4 /www/admin/www.s-fengshui.com_80/wwwroot/wp-includes/plugin.php(206): WP_Hook->apply_filters('', Array) #5 /www/admin/www.s-fengshui.com_80/wwwroot/wp-content/plugins/js_composer/include/params/vc_grid_item/attributes.php(336 in /www/admin/www.s-fengshui.com_80/wwwroot/wp-content/plugins/wpjam-basic/public/wpjam-posts.php on line 673
您的站点遇到了致命错误。

1条回复

Denis | 邓鸿华
Denis | 邓鸿华 - 4 年 前

这是你主题不规范使用 get_the_excerpt filter 引起的问题。

暂时可以先把 wpjam-basic/public/wpjam-posts.php 第 673 行改成:

add_filter('get_the_excerpt', function($text='', $post=null){

这样做下兼容性处理,下一版,我再提交更新。

我要回复

暂时不支持网页回复,请安装