- 상태
- 미해결
- 관련 플러그인/테마
- Bricks
- 주제 태그
- Compatibility
문제 개요
WPML Media Translation 플러그인이 활성화된 상태에서 Bricks 템플릿에 WPML의 복제 기능을 사용하면 기본 언어의 변경 사항이 다른 언어에 반영되지 않는 문제가 발생합니다.
임시 해결 방법
진행하기 전에 전체 사이트 백업을 완료했는지 확인하세요.
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 ); }*/