WPML
สถานะ
เปิด
ปลั๊กอิน/ธีมที่เกี่ยวข้อง
Bricks
แท็กหัวข้อ
Compatibility

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

เมื่อใช้ฟีเจอร์การทำซ้ำของ WPML กับเทมเพลต Bricks คุณจะพบว่าการเปลี่ยนแปลงในภาษาเริ่มต้นจะไม่แสดงผลในภาษาอื่น ๆ เมื่อเปิดใช้งานปลั๊กอิน WPML Media Translation

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

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

ส่วนที่ 1


  • เปิดไฟล์ …/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-custom-field-images-translation.php

  • ค้นหาบรรทัดที่ 56

  • ต่อจาก:
    		$setting          = $settings_factory->post_meta_setting( $meta_key );

  • เพิ่ม:
    	// Workaround part 1
    	$bricks_meta_keys = array(
    		'_bricks_template_type',
    		'_bricks_page_content_2',
    		'_bricks_editor_mode',
    		'_bricks_template_settings',
    	);
    
    	if ( strpos( $meta_key, 'bricks' ) !== false ) {
    		return;
    	}

ส่วนที่ 2


  • เปิดไฟล์ …/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-set-posts-media-flag.php

  • ค้นหาบรรทัดที่ 128

  • ต่อจาก:
    		$post_with_media_files = $this->post_with_media_files_factory->create( $post_id );

  • คอมเมนต์ส่วนต่อไปนี้:
    		// Workaround part 2
    		/*if ( $post_with_media_files->get_media_ids() ) { // it seems that this line is causing this issue
    			update_post_meta( $post_id, self::HAS_MEDIA_POST_FLAG, 1 );
    		} else {
    			delete_post_meta( $post_id, self::HAS_MEDIA_POST_FLAG );
    		}*/

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