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

The node clones the message which is a problem for some use cases #23

Open
michaelblight opened this issue Nov 2, 2020 · 1 comment

Comments

@michaelblight
Copy link

Before logging an issue, please make sure that you are using latest version on npm. If you are testing a development version (@next on npm or the version on GitHub), please make sure that you let me know as well.

Please ensure that as much of the following information is included as possible:

Software and Package Versions

Software Version
Node.JS v10.22.1
npm 6.14.4
Node-RED v1.2.2
fs node 1.3.2
OS Ubuntu 18.04
Browser Chrome

Note that a browser version less than current-2 or IE < v11 very unlikely to work.

How is Node-RED installed? Where is uibuilder installed?

The official docker image

Often, issues with nodes occur because of non-standard installations.
This may still indicate a bug so it is fine to report an issue. Just be sure you understand the consequences of how you have installed things.

A very common set of issues come from installing nodes as root instead of the user that runs Node-RED (e.g. using sudo on Mac/Linux). You will most likely be asked to undo that before we can analyse the issue.

Also quite common is to install the uibuilder node in the wrong folder. It is best to install using the Node-RED admin interface "Manage Palette". If installing manually, make sure you are in your userDir folder before installing (typically ~/.node-red).

I'm using fs-file-lister in a flow where maintaining the existing message is important. However, this node clones the message, which "breaks" my flow. It would be helpful if this node did not clone, or at least had the option to not clone.

@michaelblight
Copy link
Author

michaelblight commented Nov 16, 2022

Haha came back lloking for this issue almost exactly two years later and found I already raised it. This is now a bigger problem with "link call" as the return link is lost. You can probably copy the value into origPayload, and copy it back out after, but you shouldn't have to.

EDIT: Looking into the code, the problem is line 254 sends a brand new message. If you tell it to send an array instead, it will send clonedMsg (where payload is now an array), which still has msg._linkSource and anything else from the input message.

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

No branches or pull requests

1 participant