Discourse에 게시물을 게시할 때 치명적 오류 발생

최신 Discourse와 WP Discourse WordPress 플러그인을 사용 중인데, 게시물을 Discourse에 게시하려고 하면 다음 오류가 발생합니다:

E_ERROR 유형의 오류가 /www/sociocracyforall_679/public/wp-content/themes/Divi/includes/builder/feature/gutenberg/blocks/Layout.php 파일의 207번째 줄에서 발생했습니다. 오류 메시지: Uncaught ArgumentCountError: Too few arguments to function ET_GB_Block_Layout::get_the_excerpt(), 1 passed in /www/sociocracyforall_679/public/wp-includes/class-wp-hook.php on line 303 and exactly 2 expected in /www/sociocracyforall_679/public/wp-content/themes/Divi/includes/builder/feature/gutenberg/blocks/Layout.php:207
스택 트레이스:
#0 /www/sociocracyforall_679/public/wp-includes/class-wp-hook.php(303): ET_GB_Block_Layout->get_the_excerpt(‘It was yet anot…’)
#1 /www/sociocracyforall_679/public/wp-includes/plugin.php(189): WP_Hook->apply_filters(‘It was yet anot…’, Array)
#2 /www/sociocracyforall_679/public/wp-content/plugins/wp-discourse/lib/discourse-publish.php(271): apply_filters(‘get_the_excerpt’, ‘It was yet anot…’)
#3 /www/sociocracyforall_679/public/wp-content/plugins/wp-discourse/lib/discourse-publish.php(209): WPDiscourse\DiscoursePublish\DiscoursePublish->sync_to_discourse_work(32452, ‘The day I conse…’, ’

버전 간 인자 변경으로 인한 버그인 것 같습니다, 그렇지 않나요?

CJ님, 에러가 Divi 플러그인이나 그 확장 프로그램 중 하나에서 발생하는 것 같습니다.

실제로 ET_GB_Block_Layout을 구글에서 검색해 보면, 다른 여러 사이트에서도 동일한 문제가 발생하고 있음을 확인할 수 있습니다(많은 경우 구글이 스크래핑하는 HTML에 이미 존재하는 상태입니다). 해당 플러그인의 최신 버전을 사용 중인지 확인하고, 가능하면 Elegant Themes에 이 문제를 보고하는 것이 좋습니다.

스택 트레이스에 WP Discourse 코드가 나타나는 이유(아래쪽에 위치하는 경우가 많으며, 이는 일반적으로 문제가 발생하지 않는 부분임을 의미합니다)는 게시 버튼 클릭 시 게시 후(post-publication) 코드가 상호 연결된 방식으로 실행되기 때문입니다.

게시 후 예외가 발생하면 그 원인이 무엇이든, wp discourse 플러그인 코드가 스택 트레이스의 어느 시점에 나타날 가능성이 높습니다. 하지만 그것이 문제의 원인임을 의미하는 것은 아닙니다.

실제로 Divi가 활성화되어 있을 때만 발생합니다.

수정되기를 바랍니다 :slight_smile:

참고를 위한 전체 스택 트레이스:

ArgumentCountError: Uncaught exception 'ArgumentCountError' with message 'Too few arguments to function ET_GB_Block_Layout::get_the_excerpt(), 1 passed in /www/sociocracyforall_679/public/wp-includes/class-wp-hook.php on line 303 and exactly 2 expected' in /www/sociocracyforall_679/public/wp-content/themes/Divi/includes/builder/feature/gutenberg/blocks/Layout.php:207
in ET_GB_Block_Layout::get_the_excerpt called at /www/sociocracyforall_679/public/wp-includes/class-wp-hook.php (303)
in WP_Hook::apply_filters called at /www/sociocracyforall_679/public/wp-includes/plugin.php (189)
in apply_filters called at /www/sociocracyforall_679/public/wp-content/plugins/wp-discourse/lib/discourse-publish.php (271)
in WPDiscourse\DiscoursePublish\DiscoursePublish::sync_to_discourse_work called at /www/sociocracyforall_679/public/wp-content/plugins/wp-discourse/lib/discourse-publish.php (209)
in WPDiscourse\DiscoursePublish\DiscoursePublish::sync_to_discourse called at /www/sociocracyforall_679/public/wp-content/plugins/wp-discourse/lib/discourse-publish.php (158)
in WPDiscourse\DiscoursePublish\DiscoursePublish::publish_post_after_save called at /www/sociocracyforall_679/public/wp-includes/class-wp-hook.php (305)
in WP_Hook::apply_filters called at /www/sociocracyforall_679/public/wp-includes/class-wp-hook.php (327)
in WP_Hook::do_action called at /www/sociocracyforall_679/public/wp-includes/plugin.php (470)
in do_action called at /www/sociocracyforall_679/public/wp-includes/post.php (5180)
in wp_after_insert_post called at /www/sociocracyforall_679/public/wp-includes/post.php (4482)
in wp_insert_post called at /www/sociocracyforall_679/public/wp-includes/post.php (4570)
in wp_update_post called at /www/sociocracyforall_679/public/wp-admin/includes/post.php (423)
in edit_post called at /www/sociocracyforall_679/public/wp-admin/post.php (227)