WPML
ステータス
未解決
報告対象
WPML Multilingual CMS 4.6.7
関連するプラグイン/テーマ
Flux Checkout
トピックタグ
Bug, Compatibility

問題の概要

Flux Checkoutなどのプラグインを使用している場合、WPML 文字列翻訳プラグインを有効化して管理画面の言語をセカンダリ言語に切り替えると、致命的なエラーが発生する場合があります:


Fatal error: Uncaught ValueError: Unknown format specifier "t" in .../wp-content/plugins/wpml-string-translation/classes/translations-file-scan/wpml-st-translations-file-registration.php:100

回避策

続行する前に、必ずサイトの完全なバックアップを取得してください。


  • …/wp-content/plugins/wpml-string-translation/classes/translations-file-scan/wpml-st-translations-file-registration.php ファイルを開きます。

  • 以下の行の後に:
    	private function get_file_path_pattern( $file_path, $original_domain ) {
    		$pathinfo  = pathinfo( $file_path );
    		$file_type = isset( $pathinfo['extension'] ) ? $pathinfo['extension'] : null;

  • 以下を追加します:
    $file_path = str_replace('%', '', $file_path);

すべての既知の問題 →