- Trạng thái
- Đã giải quyết
- Được báo cáo cho
- WPML Multilingual CMS 4.5.10
- Đã giải quyết trong
- 4.5.11
- Thẻ chủ đề
- Bug, Compatibility
Tổng quan về lỗi
Nếu bạn dịch hình ảnh từ bất kỳ trình tạo trang nào, chẳng hạn như Divi, Avada, WPBakery, Enfold, v.v. bằng plugin WPML Media Translation, hình ảnh sẽ luôn hiển thị bằng ngôn ngữ mặc định.
Giải pháp tạm thời
Vui lòng đảm bảo sao lưu toàn bộ trang web của bạn trước khi tiếp tục.
- Mở tệp wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/media/shortcodes/class-wpml-page-builders-media-shortcodes-update.php.
- Tìm dòng 42.
- Thay thế:
$this->media_usage->update( $element->get_source_element()->get_id() );
Bằng:$this->media_usage->update( $element->get_source_element()->get_id() ); $tag_ids = wp_get_post_tags( $post->ID, array( 'fields' => 'ids' ) ); $postarr = array( 'ID' => $post->ID, 'post_content' => $post->post_content, 'tags_input' => $tag_ids, ); kses_remove_filters(); wpml_update_escaped_post( $postarr ); kses_init();
- Sau khi thêm mã, bạn có thể cần làm mới bản dịch để nhận hình ảnh đã dịch.