when save content in custom tool, open the modal content is not change #21321

Closed
opened 2026-02-21 20:11:58 -05:00 by yindo · 1 comment
Owner

Originally created by @fatelei on GitHub (Dec 27, 2025).

Originally assigned to: @fatelei on GitHub.

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. open custom tool
  2. update it, click save button, alert success
  3. open the modal again, content is not change

✔️ Expected Behavior

after save, content change

Actual Behavior

content is not changed

Originally created by @fatelei on GitHub (Dec 27, 2025). Originally assigned to: @fatelei on GitHub. ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. open custom tool 2. update it, click save button, alert success 3. open the modal again, content is not change ### ✔️ Expected Behavior after save, content change ### ❌ Actual Behavior content is not changed
yindo added the 🐞 bug label 2026-02-21 20:11:58 -05:00
yindo closed this issue 2026-02-21 20:11:58 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 27, 2025):

The modal content doesn't update after saving because the parent component isn't refreshing the data it passes to the modal. The modal initializes its state from the payload prop, but after a save, it relies on the parent to fetch the latest data and provide it again. If the parent doesn't do this, reopening the modal just shows the old content—even though the backend update succeeded. This is a frontend state management issue, not a backend bug.

To fix this, make sure the parent component calls the refetch function (from React Query or similar) after a successful save and updates the payload prop before reopening the modal. Recent refactors in the codebase moved data fetching to React Query, which should make cache invalidation and data refresh easier if integrated properly. Until this is addressed, you can manually refresh the page or tool list after saving to see the updated content.

For reference, see the modal and parent logic here:

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 27, 2025): <!-- Answer --> The modal content doesn't update after saving because the parent component isn't refreshing the data it passes to the modal. The modal initializes its state from the payload prop, but after a save, it relies on the parent to fetch the latest data and provide it again. If the parent doesn't do this, reopening the modal just shows the old content—even though the backend update succeeded. This is a frontend state management issue, not a backend bug. To fix this, make sure the parent component calls the refetch function (from React Query or similar) after a successful save and updates the payload prop before reopening the modal. Recent refactors in the codebase moved data fetching to React Query, which should make cache invalidation and data refresh easier if integrated properly. Until this is addressed, you can manually refresh the page or tool list after saving to see the updated content. For reference, see the modal and parent logic here: - [EditCustomCollectionModal code](https://github.com/langgenius/dify/blob/c393d7a2dc28875e9dad8daec9ddb6b1a055d966/web/app/components/tools/edit-custom-collection-modal/index.tsx#L36-L381) - [ProviderList and data refresh](https://github.com/langgenius/dify/blob/c393d7a2dc28875e9dad8daec9ddb6b1a055d966/web/app/components/tools/provider-list.tsx#L40-L230) - [Recent React Query refactor](https://github.com/langgenius/dify/pull/29009) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/924f979e-0ee9-4eeb-8afa-b95c08c70ada?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/924f979e-0ee9-4eeb-8afa-b95c08c70ada?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/924f979e-0ee9-4eeb-8afa-b95c08c70ada?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/924f979e-0ee9-4eeb-8afa-b95c08c70ada?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/924f979e-0ee9-4eeb-8afa-b95c08c70ada?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/924f979e-0ee9-4eeb-8afa-b95c08c70ada?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/924f979e-0ee9-4eeb-8afa-b95c08c70ada?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20modal%20content%20doesn%27t%20update%20after%20saving%20because%20the%20parent%20component%20isn%27t%20refreshing%20the%20data%20it%20passes%20to%20the%20modal.%20The%20modal%20initializes%20its%20state%20from%20the%20payload%20prop%2C%20but%20after%20a%20save%2C%20it%20relies%20on%20the%20parent%20to%20fetch%20the%20latest%20data%20and%20provide%20it%20again.%20If%20the%20parent%20doesn%27t%20do%20this%2C%20reopening%20the%20modal%20just%20shows%20the%20old%20content%E2%80%94even%20though%20the%20backend%20update%20succeeded.%20This%20is%20a%20frontend%20state%20management%20issue%2C%20not%20a%20backend%20bug.%20%0A%0ATo%20fix%20this%2C%20make%20sure%20the%20parent%20component%20calls%20the%20refetch%20function%20%28from%20React%20Query%20or%20similar%29%20after%20a%20successful%20save%20and%20updates%20the%20payload%20prop%20before%20reopening%20the%20modal.%20Recent%20refactors%20in%20the%20codebase%20moved%20data%20fetching%20to%20React%20Query%2C%20which%20should%20make%20cache%20invalidation%20and%20data%20refresh%20easier%20if%20integrated%20properly.%20Until%20this%20is%20addressed%2C%20you%20can%20manually%20refresh%20the%20page%20or%20tool%20list%20after%20saving%20to%20see%20the%20updated%20content.%20%0A%0AFor%20reference%2C%20see%20the%20modal%20and%20parent%20logic%20here%3A%20%20%0A-%20%5BEditCustomCollectionModal%20code%5D%28https%3A//github.com/langgenius/dify/blob/c393d7a2dc28875e9dad8daec9ddb6b1a055d966/web/app/components/tools/edit-custom-collection-modal/index.tsx%23L36-L381%29%20%20%0A-%20%5BProviderList%20and%20data%20refresh%5D%28https%3A//github.com/langgenius/dify/blob/c393d7a2dc28875e9dad8daec9ddb6b1a055d966/web/app/components/tools/provider-list.tsx%23L40-L230%29%20%20%0A-%20%5BRecent%20React%20Query%20refactor%5D%28https%3A//github.com/langgenius/dify/pull/29009%29)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/30249)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21321