silverstripe/silverstripe-cms — pull request #233 by ben-bookinglive (2012-11-12 12:35:48+00:00)
Title: 3.0

One of our clients was editing their site tree in this way and caused us to discover and fix this bug, so we are sharing the love:

## To Reproduce:

WARNING: this bug results in unbounded recursion, so ensure you have sensible memory/stack limits

1. Enter the site tree, create and publish a page heirarchy with one the child of the other.
2. Change the staged versions of these pages such that the child page is now the parent page.
3. Attempt to view the cms page /admin/pages, this is where the bug results.

## Resolution

The branch to pull fixes the problem by ensuring that a list of handled IDs is kept, so generating the sitetree won't attempt to render an infinite heirarchy.