What’s a Tridion Circular Reference and why worry about it? As it’s name suggests, it’s a link that results in a circle of endless self-referencing. This normally isn’t a problem…unless you have a template that does a loop through all the fields, and all the fields it contains, and the ones that the linked one contains, etc. You get the point…it’s possible to have a never-ending loop of links to ourselves. This happened recently on a project where we had a Multimedia Schema, with a Metadata field allowing the same Mutlimedia Schema (relatively sane, right?) for a mobile variant of the image. Then someone linked to itself (I guess they didn’t have a special Mobile version, and felt they must put something in the field) and then our looping template did its best to find all the linked items, and well, it died every time we published a page with this special scenario.
The fix I am using involves creating an Event System solution to detect OnComponentSave, in the initiated phase, if the Multimedia Component’s MobileImage field links to itself.
And if so, throws an exception, not allowing the content to be saved. And in the process, we save the Publishing Renderer from exhausting itself with endless links.