legacy-knowledge-base
公開されました Jun. 30, 2025

v1.0/sites/{siteId}/site-pages への POST 呼び出しが UnsupportedOperationException を返す。

written-by

Tamas Kovacs

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

問題

  • POSTエンドポイントを使ってヘッドレスAPI経由でページを追加しようとしたとき /v1.0/sites/{siteId}/site-pages、UnsupportedOperationException が返されます。

環境

  • Liferay DXP 7.4 四半期リリース

解像度

  • このAPIを呼び出すには、portal-ext.propertiesにfeature.flag.LPS-178052=trueが設定されている必要がある。
    これを呼び出すcurlコマンドの簡単な例は以下の通り:
    curl -X 'POST' 'http://localhost:8080/o/headless-delivery/v1.0/sites/33791/site-pages' -d $'{"title": "help"}' --header 'Content-Type: application/json' -u 'test@liferay.com:test'

追加情報

  • なお、この機能を実装しているエピックには、次のようなコメントがある:

    MVP1と2の後、我々は機能のアプローチを変更することに決めたので、このエピックを閉じ、新しいものを開くことにする。

    つまり、これは現在、テスト目的で製品に搭載されているだけの廃棄された機能なのだ。
did-this-article-resolve-your-issue

legacy-knowledge-base