AEM Guides:外部参照がリンクでmailto:#を使用するとサイト生成が失敗する
この記事では、外部参照に#文字で始まるmailto リンクが含まれている場合のAdobe Experience Manager Guidesでのサイト生成エラーについて説明します。
説明 description
環境
Adobe Experience Manager Guides(すべてのバージョン)
問題/症状
プリセットを使用してAEM Sites出力を生成する場合、外部参照要素に#文字で始まるmailto リンクが含まれている場合、プロセスは失敗します(例:mailto:#example@example.com)。
サイトの生成中に次のエラーが発生します。
BUILD FAILED
/mnt/crx/author/crx-quickstart/profiles/ditaot--<profile-id>/DITA-OT/plugins/org.dita.base/build_preprocess.xml:62:
Failed to run pipeline: Expected scheme-specific part at index 7: mailto:#example@example.com
- この問題は、任意のトピックで
mailto:#を持つ外部参照を追加し、AEM Sites出力を生成しようとすることで再現できます。 - このエラーは、DITA-OT前処理手順の実行中に発生します。
その他のコンテキストについては、DITA URI ベースのアドレス指定に関するドキュメントを参照してください。
解決策 resolution
-
外部参照要素を更新して、#文字にパーセント エンコーディングを使用します。
<xref>mailto:#example@example.com</xref>を使用する代わりに、#を%23としてエンコードします。次に例を示します。
code language-none <xref href="mailto:%23example@example.com" format="html">Contact Support</xref>
2. Ensure the xref uses the href attribute and includes display text.
This helps DITA-OT correctly interpret the link as an external reference.
3.Save the topic and regenerate the AEM Sites output using Presets.The site generation should now complete successfully without errors.
Cause
The DITA-OT processor interprets the # character as a fragment identifier within URIs. When used directly in a mailto link, it causes URI parsing errors. Percent-encoding the # character as %23 allows DITA-OT to process the link as intended.