WPML
สถานะ
แก้ไขแล้ว
รายงานสำหรับ
Advanced Custom Fields Multilingual 1.10.4
แก้ไขใน
2.0.0
ปลั๊กอิน/ธีมที่เกี่ยวข้อง
Advanced Custom Fields (ACF)
แท็กหัวข้อ
Compatibility

ภาพรวมของปัญหา

เมื่อใช้งาน ACF และ WPML บนเซิร์ฟเวอร์ที่ใช้ PHP 8.0 การตั้งค่ากลุ่มฟิลด์ให้แสดงบนหน้าตัวเลือกจะแสดงข้อผิดพลาดต่อไปนี้:

Warning: Trying to access array offset on value of type null in /wp-content/plugins/acfml/classes/strategy/repeater-shuffle/OptionsPage.php on line 184
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /wp-content/plugins/acfml/classes/strategy/repeater-shuffle/strategy.php on line 126

โปรดทราบว่าไม่แนะนำให้ติดตั้ง WPML โดยมีภาษาที่เปิดใช้งานเพียงภาษาเดียว

วิธีแก้ปัญหาชั่วคราว

โปรดตรวจสอบให้แน่ใจว่าคุณได้สำรองข้อมูลไซต์ของคุณอย่างสมบูรณ์ก่อนดำเนินการต่อ


  1. แก้ไขไฟล์ /wp-content/plugins/acfml/classes/strategy/repeater-shuffle/OptionsPage.php

  2. ไปที่บรรทัดที่ 184

  3. แทนที่:
    return $this->element_translations[ $id ];

    ด้วย:

    return $this->element_translations[ $id ] ?? [];

ปัญหาที่ทราบแล้วทั้งหมด →