- ステータス
- 解決済み
- 報告対象
- WPML Multilingual CMS 3.2.2
- 解決されたバージョン
- 3.2.3
問題の概要
投稿の「This is a translation of」を「-None-」に設定しようとしても保存されません。別の投稿への変更のみ可能です。
回避策
次の手順に従ってください。
- 「inc/post-translation/wpml-admin-post-actions.class.php」ファイル内の「save_post_actions」関数を見つけます。
- 次のコードブロックを見つけます。
$trid = isset( $trid ) && $trid ? $trid : $this->get_save_post_trid ( $post_id, $post->post_status ); // after getting the right trid set the source language from it by referring to the root translation // of this trid, in case no proper source language has been set yet $source_language = isset( $source_language ) ? $source_language : $this->get_save_post_source_lang ( $trid, $language_code, $default_language );
- これを次のように置き換えます。
if ( isset( $post_vars[ 'icl_translation_of' ] ) && $post_vars[ 'icl_translation_of' ] == 'none' ) { $trid = null; $source_language = $language_code; } else { $trid = isset( $trid ) && $trid ? $trid : $this->get_save_post_trid ( $post_id, $post->post_status ); // after getting the right trid set the source language from it by referring to the root translation // of this trid, in case no proper source language has been set yet $source_language = isset( $source_language ) ? $source_language : $this->get_save_post_source_lang ( $trid, $language_code, $default_language ); }
この問題は次回の新しいバージョンで解決されています。