Pricing Blog

What are orphans nodes?

  • uunicode-1437152955319976100

    unicodes

    6 days ago

    Hi there,

    I understand that it could be autofixed and easy to resolve, but what does orphan nodes mean? This error never appeared before, so why is it suddenly showing up now?
  • lucasg-1437156019460636733

    Lucas G

    6 days ago

    More likely they have been there but there wasn't a lint rule for it before so we weren't aware. I guess they're basically bugs, maybe due to connection interruptions or weird history bugs (unde/redo) 🤷‍♂️
  • Can always download the code to see what they look like if curious
  • Probably JSON blocks that are misformatted and can't render or something like that
  • keddedev-1437188228007465001

    Kedde

    6 days ago

    An orphaned node is a node that is not referenced by any parent. Any node in Nordcraft has an array of children. That way we can build and render the node tree (html). If a node exists but is not referenced by any other node it is orphaned (root node excluded as that is a special case). Orphaned nodes will not get rendered as they are not included when we build the node tree. Thus they can be safely removed.

    How orphaned nodes can happen can be more tricky. It is due to bugs obviously but it could be anywhere in creation, deletion, pasting or something else.
    👍1
  • uunicode-1437518875267829810

    unicodes

    5 days ago

    Thank you Lucas and Kedde for your help. Now is clear why now I see orphan nodes. 🙂