hmmmm... not sure that makes sense to me... I can always debug, I use NetBeans to step through, Debug:: stuff and there are also some basic PHP / SS settings to ensure errors are recorded/shown. And I can't really help without some php error to work with!
oh DUH, it's because I used the same method name and caused an infinite recursion. I should have used parent:: .
The following works now... templates can always call $ThumbnailImage and the data model provides the fallback, transparently:
public function ThumbnailImage()
$imgObj = parent::ThumbnailImage();
if (!$imgObj->exists()) $imgObj = $this->PrimaryImage();
I also learned the hard way that a has_one object always "exists" in an object sense, so line 2 of the above function could not be "if (!$imgObj)" or "if (is_null($imgObj))" which works elsewhere. Here, we had to use the provided "exists()" method of the object.