# DB2 - Layout Editor Error in Subflow

**URL:** https://discourse.nodered.org/t/db2-layout-editor-error-in-subflow/96163
**Category:** Dashboard
**Tags:** layout, dashboard-2
**Created:** [21 March 2025 21:24 UTC](https://discourse.nodered.org/t/db2-layout-editor-error-in-subflow/96163 "2025-03-21T21:24:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mitty45](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@mitty45](https://discourse.nodered.org/u/mitty45)
#### Post date: [21 March 2025 21:24 UTC](https://discourse.nodered.org/t/db2-layout-editor-error-in-subflow/96163/1 "2025-03-21T21:24:30Z")

</div>

When using the layout editor in Dashboard 2, I am receiving the following error:

**Error saving changes. Request failed with status code 400.**

Looking into the browser console log, I see:

> AxiosError {message: 'Request failed with status code 400', name: 'AxiosError', code: 'ERR\_BAD\_REQUEST', ...}  
> and a response saying "Error: Widget not found".

I did also notice a ticket was opened on this topic previously:  
[Can't save changes in layout editor](https://github.com/FlowFuse/node-red-dashboard/issues/1591) #1591

It seems like the issue is due to the use of ui nodes within a subflow. Is there anyway to avoid the error in the meantime until a proper bugfix is in place?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [22 March 2025 08:58 UTC](https://discourse.nodered.org/t/db2-layout-editor-error-in-subflow/96163/2 "2025-03-22T08:58:56Z")

</div>

Are you trying to order the widgets within the subflow, or to position the subflow itself?

As I understand it there is currently no simple way to order the widgets within the subflow (see [Widget ordering in subflows · Issue #1062 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/1062)).

Also it is not possible to position a subflow containing ui nodes. See [Unable to position a subflow containing a ui-node on the dashboard · Issue #710 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/710)

---

<div class="post-metadata">

### Author: ![mitty45](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@mitty45](https://discourse.nodered.org/u/mitty45)
#### Post date: [24 March 2025 17:54 UTC](https://discourse.nodered.org/t/db2-layout-editor-error-in-subflow/96163/3 "2025-03-24T17:54:49Z")

</div>

I am trying to move around the widgets, order them, and even resize them within the subflow; all return the same error shown above when saved and then revert to the previous arrangement.

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [24 March 2025 19:53 UTC](https://discourse.nodered.org/t/db2-layout-editor-error-in-subflow/96163/4 "2025-03-24T19:53:05Z")

</div>

A similar [issue](https://github.com/FlowFuse/node-red-dashboard/issues/1591) has already been reported. A lot of stuff is going on in the endpoint, so lots of stuff can go wrong. It would simplify troubleshooting, if some more details about the root cause should be written to the log.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [24 March 2025 20:54 UTC](https://discourse.nodered.org/t/db2-layout-editor-error-in-subflow/96163/5 "2025-03-24T20:54:17Z")

</div>

I think the fundamental problem may be that ordering within a subflow is not supported at all, so until it is supported it isn't surprising if the wysiwyg editor fails.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [23 April 2025 20:54 UTC](https://discourse.nodered.org/t/db2-layout-editor-error-in-subflow/96163/6 "2025-04-23T20:54:46Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
