- סטטוס
- ממתין למפתח
- דווח עבור
- WPML Multilingual for BuddyPress and BuddyBoss 1.7.0
- תוסף/ערכת עיצוב קשורים
- BuddyPress
- תגיות נושא
- Compatibility
סקירה כללית של התקלה
עדכון אחרון ל־BuddyPress 12.4.1 גרם לבעיית תאימות עם WPML, במיוחד בכל הנוגע לטיפול בתיאורי קבוצות. שינוי זה הוביל לשגיאה קריטית כאשר הפילטר bp_get_group_description_excerpt של BuddyPress נקרא, מכיוון שכעת חסר בו ארגומנט שני הכרחי שנדרש בעבר:
[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 ) ); }