Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form - Fix form node not passing on msg.topic on submit #1483

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cgjgh
Copy link
Contributor

@cgjgh cgjgh commented Nov 19, 2024

Description

Fixes msg.topic not being applied on form submits.
Not completely sure if this meets any previously agreed upon design pattern for applying topics.

Related Issue(s)

Closes #1453

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • Includes a DB migration? -> add the area:migration label

@joepavitt
Copy link
Collaborator

Thanks @cgjgh - this is an odd one, as the appendTopic function runs as a universal line in

try {
msg = await appendTopic(RED, widgetConfig, wNode, msg)
// pre-process the msg before send on the msg (if beforeSend is defined)
if (widgetEvents?.beforeSend && typeof widgetEvents.beforeSend === 'function') {
msg = await widgetEvents.beforeSend(msg)
}
// send the msg onwards
wNode.send(msg)

Which is part of the onAction handler in our ui-base. So the change you've submitted, whilst working, feels like it's covering another issue we have somewhere

@joepavitt joepavitt changed the title Fix form node not passing on msg.topic on submit Form - Fix form node not passing on msg.topic on submit Dec 2, 2024
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.

Form node does not pass on topic when configured to do so
2 participants