WP 쪽에서 Discourse 포럼으로 연결되는 링크가 없는 문제가 있습니다. 이 문제에 대해 포럼에서 찾은 답변들만 몇 가지 나열하면 다음과 같습니다:
WP 관리자 화면 → 플러그인 섹션에서 모든 ‘Text Content’ 필드가 채워져 있습니다.
동기화는 실행되고 있으며, 양쪽에서 댓글을 확인할 수 있습니다.
_postmeta DB 테이블에 URL 문자열이 존재합니다.
댓글 섹션에서는 다음과 같은 Notices가 표시됩니다:
**Notice**: Trying to access array offset on value of type null in **/home/u48255p44743/domains/fxweb.snowfreakz.nl/public_html/wp-content/plugins/wp-discourse/lib/discourse-comment-formatter.php** on line **90**
**Notice**: Trying to access array offset on value of type null in **/home/u48255p44743/domains/fxweb.snowfreakz.nl/public_html/wp-content/plugins/wp-discourse/lib/discourse-comment-formatter.php** on line **106**
**Notice**: Trying to access array offset on value of type null in **/home/u48255p44743/domains/fxweb.snowfreakz.nl/public_html/wp-content/plugins/wp-discourse/lib/discourse-comment-formatter.php** on line **127**
**Notice**: Trying to access array offset on value of type null in **/home/u48255p44743/domains/fxweb.snowfreakz.nl/public_html/wp-content/plugins/wp-discourse/lib/discourse-comment-formatter.php** on line **127**
**Notice**: Trying to access array offset on value of type null in **/home/u48255p44743/domains/fxweb.snowfreakz.nl/public_html/wp-content/plugins/wp-discourse/lib/discourse-comment-formatter.php** on line **148**
**Notice**: Trying to access array offset on value of type null in **/home/u48255p44743/domains/fxweb.snowfreakz.nl/public_html/wp-content/plugins/wp-discourse/lib/discourse-comment-formatter.php** on line **148**
이것들은 모두 해당 파일의 $URL 변수와 관련이 있습니다. 저는 다음과 같이 댓글을 호출하고 있습니다:
<?php
global $post;
use WPDiscourse\Utilities\Utilities as DiscourseUtilities;
$discourse_comments = DiscourseUtilities::get_discourse_comments($post->ID);
echo $discourse_comments;
?>
Error: Too few arguments to function WPDiscourse\Utilities\Utilities::get_discourse_comments(), 1 passed in /home/u43655p432443/domains/domain.nl/public_html/wp-content/themes/bricks/includes/elements/code.php(159) : eval()'d code on line 4 and exactly 4 expected
따라서 Bricks와 관련된 문제인 것 같습니다. Bricks 커뮤니티에도 문의해 보겠습니다.
이 오류는 유틸리티 함수 get_discourse_comments의 사용법을 업데이트해야 한다는 것을 알려줍니다. 사용 예시는 다음과 같습니다.
global $post;
use WPDiscourse\Utilities\Utilities as DiscourseUtilities;
$discourse_comments = DiscourseUtilities::get_discourse_comments($post->ID, true, true, 'display-comments');
echo $discourse_comments;