Relevanssi Version 2.8.0: PHP Fatal error in woocommerce.php on post save
-
When Saving a post, I get this PHP error.
[Wed Mar 25 20:03:55.646055 2020] [php7:error] [pid 26773] [client 84.123.76.142:40696] PHP Fatal error: Uncaught Error: Cannot use assign-op operators with string offsets in /var/www/domain.com/public_html/wp-content/plugins/relevanssi-premium/lib/compatibility/woocommerce.php:22\nStack trace:\n#0 /var/www/domain.com/public_html/wp-includes/class-wp-hook.php(288): relevanssi_woocommerce_restriction('Array AND post....')\n#1 /var/www/domain.com/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters('Array AND post....', Array)\n#2 /var/www/domain.com/public_html/wp-content/plugins/relevanssi-premium/lib/indexing.php(837): apply_filters('relevanssi_inde...', Array)\n#3 /var/www/domain.com/public_html/wp-includes/class-wp-hook.php(290): relevanssi_insert_edit(4132)\n#4 /var/www/domain.com/public_html/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array)\n#5 /var/www/domain.com/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)\n#6 /var/www/domain.com/public_html/wp-includes/post.php(4131): do_action('wp_insert_post', 4132, Object(WP_Post), true)\n#7 /var/www/domain.com/public_html/wp-includes/post.php(4197) in /var/www/domain.com/public_html/wp-content/plugins/relevanssi-premium/lib/compatibility/woocommerce.php on line 22, referer: https://domain.com/wp-admin/post.php?post=4132&action=edit&classic-editor
SO I commented out
add_filter( 'relevanssi_indexing_restriction', 'relevanssi_woocommerce_restriction' );
in woocommerce.phpThen I get antoher error
[Wed Mar 25 20:15:52.916092 2020] [php7:error] [pid 27658] [client 84.123.76.142:38326] PHP Fatal error: Uncaught Error: Cannot use assign-op operators with string offsets in /var/www/domain.com/public_html/wp-content/plugins/relevanssi-premium/lib/compatibility/yoast-seo.php:46\nStack trace:\n#0 /var/www/domain.com/public_html/wp-includes/class-wp-hook.php(288): relevanssi_yoast_exclude('Array AND post....')\n#1 /var/www/domain.com/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters('Array AND post....', Array)\n#2 /var/www/domain.com/public_html/wp-content/plugins/relevanssi-premium/lib/indexing.php(837): apply_filters('relevanssi_inde...', Array)\n#3 /var/www/domain.com/public_html/wp-includes/class-wp-hook.php(290): relevanssi_insert_edit(4132)\n#4 /var/www/domain.com/public_html/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array)\n#5 /var/www/domain.com/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)\n#6 /var/www/domain.com/public_html/wp-includes/post.php(4131): do_action('wp_insert_post', 4132, Object(WP_Post), true)\n#7 /var/www/domain.com/public_html/wp-includes/post.php(4197): wp_insert_ in /var/www/domain.com/public_html/wp-content/plugins/relevanssi-premium/lib/compatibility/yoast-seo.php on line 46, referer: https://domain.com/wp-admin/post.php?post=4132&action=edit&classic-editor
So I commented out
add_filter( 'relevanssi_indexing_restriction', 'relevanssi_yoast_exclude' );
in yoast-seo.php and the error is gone.Any ideas what this could be and is there a fix?
- The topic ‘Relevanssi Version 2.8.0: PHP Fatal error in woocommerce.php on post save’ is closed to new replies.