Import Flow / View Nodes - no indication of duplication for junction nodes

Hi There!

I sometimes get "Some of the nodes you are importing already exist in your workspace." and when I view nodes, I get something like:

Basically there is no duplication to see!

I sat down and decided to find out what is going on. Turns out I have a junction that is duplicated across two flows. I.e., one of the two junctions shown in the image is a duplicate.

Any idea why the junction that is the duplicate isn't highlighted (by being unchecked)?

At the moment, the dialog isn't really useful since it seems everything is always checked...

You may need to show the first screen you see when you import the nodes.

There are 3 options.

Which one do you select there?

It looks like there are more items (but no scroll bar). Can you inspect the html/CSS and see if your mysterious node is scrolled off screen.

Regarding duplicate junction nodes, I'm not certain they should be called out as duplicates regardless of having the same ID tbh

"View Nodes" --> import copy and cancel aren't really an option ....

Screen Shot 2024-01-29 at 10.12.11

you mean in the workspace or in the listing? Either way, I'd do it with JS (as I did) to find the node....

I don't care - IDC! :wink:

Ok, so you click View Nodes.

Then you see ANOTHER screen - which I am not seeing here - where you select that node and then you have an option to do three things.
Ok, you posted doing my writing this reply.

But after I click the MIDDLE button: view nodes (as shown in your picture)
I get this

See picture.

In this example I am importing a SUBFLOW.

I click the white button (top left) AND the replace button (top right)

Then import and all is good.

But that doesnt really help us understand if it is a browser thing or a Node-RED bug.

What i hope to see is a node in the list with the option to replace

1 Like

The import is not perfect, there are cases which are not handled. In addition certain properties (belonging to the editor) are not shown.

Ah ok :+1:

Yes, no scrollbar and yes it goes on and - having checked - I know it's one of the junctions that is a duplicate ... hence there should be an unchecked there.

Subflows work but this was a junction that was causing the same error message and yet I wasn't shown the junction that was the duplication.

I think that's the point I was trying to make or rather the feeling I have :wink:

Thanks for checking folks :+1:

As background, I do a lot of importing so this happens often and eventually it becomes annoying that I don't know what it is that is duplicated. But it made me - finally - build a workaround for my use cases ...

I understand your frustration, but it would be really nice if you could please document repeatable issues and raise issues with step-by-step instructions and flows that demonstrate it. Then we could get this resolved in core in a future maintenance release. (thats the utopia anyhow)

Can you provide some examples of cases that are not handled? What properties are not shown? It should only be considering the properties of the node as per the flow json.

I agree but this is the reason why a node is indicated as changed but the window does not show it.

I have not yet tested the import in depth, for the moment I only have this case #4548 related to a type changes.

I also notice that the "replace" button is not always displayed (and not correctly) probably because of the size (i18n)

So, as soon as I have time I will do more tests :slightly_smiling_face: (an raise issue)

No frustration, well frustration enough that I will create something more logical!

Example: go here and import this flow:


of the four junctions checked only three are included on the flow and one is new ... which is which?

that's the view nodes dialog with all four junctions being checked although I was told there are duplicates?

Please raise an issue with steps to recreate. I will look at this in my weekly live-stream later today (4pm GMT Twitch)

Done - Importing flow with duplicate junction nodes: unclear which are junction nodes are duplicates · Issue #4549 · node-red/node-red · GitHub

I haven't checked if your PR fixes it
(the field with "replace" is truncated)