WPML
ステータス
解決済み
解決されたバージョン
4.5.0
関連するプラグイン/テーマ
Divi

問題の概要

メディアリンク(PDFファイルなど)を指し示す動的コンテンツをDiviモジュールに追加し、そのモジュールを翻訳すると、翻訳されたリンクは翻訳されたメディアを指し示さず、404エラーが発生します。

回避策

現在、この問題の恒久的な修正に取り組んでいます。それまでの間、以下の手順に従ってサイトの問題を修正できます。


  1. サイトのファイルとデータベースをバックアップします。

  2. wp-content/themes/Divi/includes/builder/feature/dynamic-content.phpに移動します。

  3. 次を検索します。
    $dynamic_content = json_decode( $json, true );


  4. その行の後に、次を追加します。
    if ($dynamic_content != NULL && $dynamic_content['settings']['post_id'] != NULL) {
    		$post_type                              = get_post_type( $dynamic_content["settings"]["post_id"] );
    		$dynamic_content["settings"]["post_id"] = apply_filters( 'wpml_object_id',
    			$dynamic_content['settings']['post_id'], $post_type, true );
    	}

すべての既知の問題 →