Skip to content

Fix validation of Subflow - #5957

Merged
knolleary merged 1 commit into
node-red:mainfrom
GogoVega:fix-subflow-validation
Oct 8, 2026
Merged

knolleary merged 1 commit into
node-red:mainfrom
GogoVega:fix-subflow-validation

Conversation

@GogoVega

Copy link
Copy Markdown
Contributor

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

Fix validation of Subflow. The Subflow object has a definition, causing it to be validated as a standard node.

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the forum/slack team.
  • I have run npm run test to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

@knolleary

Copy link
Copy Markdown
Member

What issue is this fixing? How to recreate to verify what this fix is doing?

@GogoVega

GogoVega commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Import the below flow:

[{"id":"7297e7477642c9e3","type":"subflow","name":"Subflow 1","info":"","in":[],"out":[]},{"id":"0eca7f35cb818897","type":"mqtt in","z":"7297e7477642c9e3","name":"","topic":"","qos":"2","datatype":"auto-detect","nl":false,"rap":true,"rh":0,"inputs":0,"x":190,"y":80,"wires":[[]]},{"id":"31bf2fabf146f4c6","type":"subflow:7297e7477642c9e3","z":"af9187370c7594c9","name":"","x":320,"y":2040,"wires":[]}]

When a Subflow instance is validated, the validity of the Subflow (definition) itself is checked.

The Subflow contains an unconfigured (and therefore invalid) MQTT node; consequently, the Subflow—and by extension, the instances—are considered invalid. However, this is not actually the case.

@knolleary

Copy link
Copy Markdown
Member

@GogoVega to summarise:

A subflow instance node does not show a configuration error when one of its internal nodes has a config error

@GogoVega

GogoVega commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Yep. That's a good summary.

@knolleary
knolleary merged commit dceabd7 into node-red:main Oct 8, 2026
3 checks passed
@GogoVega
GogoVega deleted the fix-subflow-validation branch October 8, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants