From 8381858d588ac110a3eace1ae9cfe51eeeb2ad55 Mon Sep 17 00:00:00 2001 From: Saophalkun Ponlu Date: Fri, 19 Nov 2010 03:00:48 +0000 Subject: [PATCH] MINOR: Make sure that Translatable creates a translated parent of SiteTree only when the parent is not translated (from r113955) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113956 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/Translatable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/model/Translatable.php b/core/model/Translatable.php index 86cf18b69..dd6a0d8d4 100755 --- a/core/model/Translatable.php +++ b/core/model/Translatable.php @@ -771,7 +771,7 @@ class Translatable extends DataObjectDecorator implements PermissionProvider { // Caution: This logic is very sensitve to infinite loops when translation status isn't determined properly // If a parent for the newly written translation was existing before this // onBeforeWrite() call, it will already have been linked correctly through createTranslation() - if($this->owner->hasField('ParentID')) { + if($this->owner->hasField('ParentID') && $this->owner instanceof SiteTree) { if( !$this->owner->ID && $this->owner->ParentID