legacy-knowledge-base
公開されました Sep. 10, 2025

カスタムフィールドでPATCHリクエストが機能しない

written-by

Pooja Bhambani

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. Liferayを起動し、パスワードを'a'に変更する
    2. コントロールパネル >設定 > カスタムフィールド
    3.
    4. 新しいカスタムフィールドを追加するには、+アイコンをタップします。
    5. 入力フィールドを選択し、フィールド名に「Testcustom」と入力し、保存する。
    6. headless-admin を使って新しい組織を追加する:

    curl -X 'PUT' \
    'http://localhost:8080/o/headless-admin-user/v1.0/organizations/by-external-reference-code/testerc' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
    "customFields": [
    {
    "customValue": {
    "data": "Test value"
    },
    "name": "Testcustom"
    }
    ],
    "name": "test org"
    }' \
    -u 'test@liferay.com:a'
    :warning: The new organization is visible on the UI, and inside it you can see the custom field with the value "Test value"

    注:新しい組織はUI上に表示され、その中に値「Test value」を持つカスタムフィールドを見ることができます
    7. 次に、PATCHリクエストでカスタムフィールドを更新する:

    curl -X 'PATCH' \
    'http://localhost:8080/o/headless-admin-user/v1.0/organizations/by-external-reference-code/testerc' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
    "customFields": [
    {
    "customValue": {
    "data": "New value"
    },
    "name": "Testcustom"
    }
    ]
    }' \
    -u 'test@liferay.com:a'
    The Custom field's value has not changed, it is still "Test value" instead of "New value"

    実際の動作:カスタムフィールドの値は変更されず、"New value "ではなく "Test value "のままである
    期待される動作:カスタムフィールドの値は "新しい値 "に変わるはずです。

環境

  • Liferay DXP 7.4

解像度

  • 観測された動作は、Liferay DXP7.4 Update 66で対処されたLiferay DXPの既知のバグです。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base