Henjo Hoeksma
Henjo Hoeksma
family, life, webdevelopment, productivity, entrepeneur, mac, motorcycling, climbing

Orphaned nodes in a Neos installation...

Due to a bug in a Neos related package I ended up with a bunch of orphaned nodes in a production database. Not nice - especially since it has just been Fathers-day - and also those nodes without a parent just felt wrong...

It did not help of course very much that the client actually spend a couple of hours in that part of the tree editing and creating content just a couple days prior.

So - let's fix it!

Battle plan

No good war without a strategy. So let's make sure that one was in place:

  1. Make sure we have the reason of this situation identified
  2. Take care of this not happening again if we can
  3. Reconnect the orphans to a (new) parent (the adoption process)
  4. Check, make the client happy again and celebrate the victory!

Make sure we have the reason of this situation identified

That is actually a result from a known issue (https://jira.neos.io/browse/NEOS-1836)

Take care of this not happening again if we can

For now I cannot - but is stays on my radar. Since I have no time fixing the real issue right I could decide to remove the package for the time being - but that is not a solution in a project where we extensively make use of redirects without creating a different solution.

Reconnect the orphans to a (new) parent (the adoption process)

This is where the fun comes into the warzone... Since a node:repair command shows us the orphaned nodes it is easy to detract the parent node path from them.
I created a new node, copied that path and the the following database query (of course after making a backup ;-) ):

Check, make the client happy again and celebrate the victory!


Published at 20-06-2016

  • neos