Changing Node names causes breaking node names in expressions

I have a Trigger Telegram node and a fina regular Telegram node. Somewere in the workflow I refer to the trigger to grab a parameter. But when I change the name of the final TG node, my data changes the address and starts referring to the regular node.

  1. My correct reference is like this (don’t pay attention to the first red alert). The second variable refers to the Trigger:
  2. I change my final node’s name from simply Telegram to Results to Telegramimage
    image
  3. Voilà! The reference in the node got broken:

Seems like the node name update in expressions is based on simple word substitution.

That does not happen always but in some cases, and is sadly a known issue. That code that changes existing expressions on rename is simply far from perfect and has never been updated or looked at since I hacked it together in the early days.

If you reference a node-name in a Function or FunctionItem-Node it is even worst, as there it will never get updated and breaks for sure.

2 Likes

Got it @jan . Hopefully one day it will get fixed.

Yes, that is the plan. Sadly only one of a thousand things on our list :wink:

Contributions are obviously always welcome.

6 Likes

Node name (name should be more for node identification by the user) should be different than node ID (which should be unique and unchangeable, and used for referencing inside a code). Then each node could be referenced by ID and code would not break. But fixing software later is hard and that’s why software architecture is so hard - each design mistake is hard to fix down the line… But I think this will not be so hard to fix.

Immediately after reading this post I noticed “Note” feature of nodes. Maybe node name can be used as unique identifier and note should be used as a node name/description. That would solve all the referencing issues. Maybe node name should be assigned unique name by default and node field “hidden” in the node settings while note being exposed for easy/quick editing (as name is currently).