WPML
Trạng thái
Đang mở
Plugin/giao diện liên quan
Bricks
Thẻ chủ đề
Compatibility

Tổng quan về lỗi

Khi sử dụng tính năng nhân bản của WPML với các template Bricks, bạn sẽ gặp tình trạng các thay đổi trong ngôn ngữ mặc định không được phản ánh sang các ngôn ngữ khác khi plugin WPML Media Translation đang hoạt động.

Giải pháp tạm thời

Vui lòng đảm bảo bạn có bản sao lưu toàn bộ trang web trước khi tiếp tục.

Phần I


  • Mở tệp …/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-custom-field-images-translation.php.

  • Tìm dòng 56.

  • Ngay sau:
    		$setting          = $settings_factory->post_meta_setting( $meta_key );

  • Thêm:
    	// 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;
    	}

Phần II


  • Mở tệp …/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-set-posts-media-flag.php.

  • Tìm dòng 128.

  • Ngay sau:
    		$post_with_media_files = $this->post_with_media_files_factory->create( $post_id );

  • Chuyển phần sau thành comment:
    		// 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 );
    		}*/

Tất cả các lỗi đã ghi nhận →