WPML

문제 개요

BuddyBoss에서 토론이 번역될 때, 번역된 버전이 올바른 포럼에 할당되지 않거나 포럼 루프 내에 표시되지 않을 수 있습니다. 이 문제로 인해 프런트엔드에서 해당하는 번역된 포럼 아래에 번역된 토론이 표시되지 않을 수 있습니다.

임시 해결 방법

이 문제는 BuddyPress Multilingual 1.8.0에서 해결되었습니다. 업데이트하면 사이트에서 문제가 해결되므로, 아직 업데이트할 수 없는 경우에만 이 임시 해결 방법이 필요합니다.

진행하기 전에 사이트의 전체 백업을 완료했는지 확인하세요.

  • WPML설정사용자 정의 XML 구성 페이지로 이동하세요.
  • 다음 XML을 추가하세요:
    XML
    <wpml-config>
      <custom-fields>
        <custom-field action="copy-once">_bbp_forum_id</custom-field>
        <custom-field action="copy-once">_bbp_last_active_time</custom-field>
        <custom-field action="copy-once">_bbp_activity_id</custom-field>
        <custom-field action="copy-once">_bbp_author_ip</custom-field>
        <custom-field action="copy-once">	_bbp_reply_count</custom-field>
        <custom-field action="copy-once">_bbp_reply_count_hidden</custom-field>
        <custom-field action="copy-once">_bbp_topic_id</custom-field>
        <custom-field action="copy-once">_bbp_voice_count</custom-field>
      </custom-fields>
    </wpml-config>
  • 테마의 functions.php 파일을 여세요.
  • 다음 PHP 코드를 추가하세요:
    PHP
    // WPMl Workaround for compsupp-7242
    function wpml_compsupp7242_filter_bbp_get_topic_forum_id($forum_id, $topic_id) {
        if ( class_exists('Sitepress') ) {
            $forum_id = apply_filters('wpml_object_id', $forum_id, get_post_type($forum_id), TRUE);
        }
    
        return $forum_id;
    }
    
    add_filter('bbp_get_topic_forum_id', 'wpml_compsupp7242_filter_bbp_get_topic_forum_id', 10, 2);
    
    // I'm not sure if this other filter is really needed, but I'm also adding here for reference
    function wpml_compsupp7242_filter_bbp_get_forum_id($bbp_forum_id, $forum_id) {
        if ( class_exists('Sitepress') ) {
            $bbp_forum_id = apply_filters('wpml_object_id', $bbp_forum_id, get_post_type($bbp_forum_id), TRUE);
        }
    
        return $bbp_forum_id;
    }
    
    add_filter('bbp_get_forum_id', 'wpml_compsupp7242_filter_bbp_get_forum_id', 10, 2);
  • 원본 토론을 약간 수정한 다음 저장하세요.
  • 해당 번역을 업데이트하세요

모든 알려진 문제

여전히 이 문제가 발생합니까?

업데이트해도 문제가 해결되지 않으면 지원 문의를 하세요. 함께 살펴보겠습니다.