legacy-knowledge-base
公開されました Jul. 2, 2025

WebContent構造における画像に関する問題点

written-by

Amit Tiwari

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

1. バニラ7.1をdxp-2で使用します。

2. 新しいサイトのローカルステージングを有効にする。

3. ステージングサイトでは、ウェブコンテンツ「構造」を作成し、タイプ「イメージ」のフィールドを追加し、
、フィールドを「必須」と設定します。

4. 構造を持つ新しいウェブコンテンツを作成します。

5. テストデータを挿入し、「画像の説明」欄にアポストロフィ
の文字が入った文章を挿入する(例:「この画像はうまくいかない」)。

6. WebContentを公開する。

7. 本番環境に公開.

ISSUE 2 -> Error: The Web Content Article test image could not be imported because of the following error: Invalid XPath expression: //dynamic-element[@type='image']/dynamic-content[contains(text(),'{"groupId":"34367","name":"barletta.jpg","alt":"this image doesn't work","title":"barletta.jpg","type":"journal","uuid":"b11102cb-1f88-6e89-6eb1-cf3c6551aeeb","fileEntryId":"45003","resourcePrimKey":"45001"}')] Expected: ).

アポストロフィ」を削除すれば、publish to liveは問題なく動作します。

Environment

  • Liferay DXP 7.1

解決策

  • liferay-fix-pack-dxp-6 以上で、観測された動作が解決され、修正されています。
  • Installing Fix Packs and Hotfixes on Liferay DXP これらのFixpackをお客様の環境にインストールする方法をご案内します。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base