- สถานะ
- แก้ไขแล้ว
- แก้ไขใน
- WPML 4.6.7
- ปลั๊กอิน/ธีมที่เกี่ยวข้อง
- LiteSpeed Cache
- แท็กหัวข้อ
- Compatibility
ภาพรวมของปัญหา
หากคุณกำลังใช้ปลั๊กอิน LiteSpeed Cache คุณอาจพบปัญหาในการแปลโพสต์ โดยเฉพาะอย่างยิ่ง เมื่อผู้ใช้สร้างและแปลโพสต์ใหม่ โพสต์ที่แปลแล้วจะไม่คงหมวดหมู่จากโพสต์ต้นฉบับไว้
วิธีแก้ปัญหาชั่วคราว
ตัวเลือกที่ 1
- ไปที่หน้า Litespeed cache > Cache > Purge > Auto Purge Rules For Publish/Update
- ปิดการใช้งานตัวเลือก Term archive (include category, tag, and tax)
หรือ:
ตัวเลือกที่ 2
โปรดตรวจสอบให้แน่ใจว่าคุณได้สำรองข้อมูลทั้งหมดของไซต์ของคุณก่อนดำเนินการต่อ
- เปิดไฟล์ …/wp-content/plugins/litespeed-cache/src/purge.cls.php
- ค้นหาบรรทัดที่ 1172
- เปลี่ยน:
$terms = get_the_terms($post_id, $tax);
- เป็น
// WPML Workaround for compsupp-6805 $terms = ''; if( class_exists('SitePress') ){ $default_language = apply_filters('wpml_default_language', NULL ); $current_language = apply_filters('wpml_current_language', NULL ); if ( $default_language === $current_language ) { $terms = get_the_terms($post_id, $tax); } } else { $terms = get_the_terms($post_id, $tax); }