Hello!
Discourse is breaking when I click the “Publish to Discourse” button in a post.
The issue goes away when I disable the Beaver Builder plugin, however, after contacting the Beaver Builder team, this was their response:
The issue is with the discourse plugin, they are using a fillter wrong, one of our team reported it to them last year and even took the time to give them the fix as you can see here https://github.com/discourse/wp-discourse/issues/432 there isnt anything we can do from our end im afraid.
Can you please address this issue? Here is the error from debug.log:
[20-Jan-2023 02:38:01 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function FLBuilderCompatibility::fix_rest_excerpt_filter(), 1 passed in .../wp-includes/class-wp-hook.php on line 308 and exactly 2 expected in .../wp-content/plugins/bb-plugin/classes/class-fl-builder-compatibility.php:1180
Stack trace:
#0 .../wp-includes/class-wp-hook.php(308): FLBuilderCompatibility::fix_rest_excerpt_filter()
#1 .../wp-includes/plugin.php(205): WP_Hook->apply_filters()
#2 .../wp-content/plugins/wp-discourse/lib/discourse-publish.php(238): apply_filters()
#3 .../wp-content/plugins/wp-discourse/lib/discourse-publish.php(177): WPDiscourse\DiscoursePublish\DiscoursePublish->sync_to_discourse_work()
#4 .../wp-content/plugins/wp-discourse/lib/discourse-publish.php(126): WPDiscourse\DiscoursePublish\DiscoursePublish->sync_to_discourse()
#5 .../wp-content/plugins/wp-discourse/admin/discourse-sidebar/discourse-sidebar.php(516): WPDiscourse\DiscoursePublish\DiscoursePublish->publish_post_after_save()
#6 .../wp-includes/rest-api/class-wp-rest-server.php(1171): WPDiscourse\Admin\DiscourseSidebar->publish_topic()
#7 .../wp-includes/rest-api/class-wp-rest-server.php(1018): WP_REST_Server->respond_to_request()
#8 .../wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch()
#9 .../wp-includes/rest-api.php(410): WP_REST_Server->serve_request()
#10 .../wp-includes/class-wp-hook.php(308): rest_api_loaded()
#11 .../wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#12 .../wp-includes/plugin.php(565): WP_Hook->do_action()
#13 .../wp-includes/class-wp.php(399): do_action_ref_array()
#14 .../wp-includes/class-wp.php(780): WP->parse_request()
#15 .../wp-includes/functions.php(1332): WP->main()
#16 .../wp-blog-header.php(16): wp()
#17 .../index.php(17): require('/home/...')
#18 {main}
thrown in .../wp-content/plugins/bb-plugin/classes/class-fl-builder-compatibility.php on line 1180
Thank you!
Jake