WPML
상태
개발자 대기 중
보고된 제품
WPML Multilingual for BuddyPress and BuddyBoss 1.7.0
관련 플러그인/테마
BuddyPress
주제 태그
Compatibility

문제 개요

최근 BuddyPress 12.4.1 업데이트에서 특히 그룹 설명 처리와 관련하여 WPML과의 호환성 문제가 발생했습니다. BuddyPress 필터 bp_get_group_description_excerpt 호출 시 이전에 필요했던 두 번째 필수 인수가 누락되어 치명적인 오류가 발생합니다:


[06-May-2024 15:51:02 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function WPML\\BuddyPress\\Groups::translateExcerpt(), 1 passed in ..../wp-includes/class-wp-hook.php on line 324 and exactly 2 expected in .../wp-content/plugins/buddypress-multilingual/includes/class.groups.php:84

이 문제는 BuddyPress 팀에 이미 보고되었습니다.

임시 해결 방법

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


  • …/wp-content/plugins/buddypress-multilingual/includes/class.groups.php 파일을 여세요.

  • 84번째 줄을 찾으세요.

  • 다음을:
    	public function translateExcerpt( $excerpt, $group ) {
    		$getTranslation = $this->translate( 'description' );
    
    		return bp_create_excerpt( $getTranslation( $excerpt, $group ), strlen( $excerpt ) );
    	}

  • 다음으로 교체하세요:
    	public function translateExcerpt( $excerpt, $group = null ) {
    		if( is_null($group ) ){
    				return $excerpt;
    		}
    
    		$getTranslation = $this->translate( 'description' );
    
    		return bp_create_excerpt( $getTranslation( $excerpt, $group ), strlen( $excerpt ) );
    	}

알려진 모든 문제 →