WPML
상태
해결됨
보고된 제품
WPML Multilingual for BuddyPress and BuddyBoss 1.7.0
해결된 버전
BuddyPress Multilingual 1.8.0
관련 플러그인/테마
BuddyBoss Platform
주제 태그
Compatibility

문제 개요

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

임시 해결 방법

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


  • WPML > 설정 > 사용자 정의 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 코드를 추가하세요:
    // 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);
  • 원본 토론을 약간 수정한 다음 저장하세요.
  • 해당 번역을 업데이트하세요

알려진 모든 문제 →