diff --git a/forms/HtmlEditorField.php b/forms/HtmlEditorField.php index bcc62af18..233198134 100755 --- a/forms/HtmlEditorField.php +++ b/forms/HtmlEditorField.php @@ -154,7 +154,7 @@ class HtmlEditorField extends TextareaField { $fieldName = $this->name; if($record->ID && $record->hasMethod('LinkTracking') && $linkTracking = $record->LinkTracking()) { - $linkTracking->removeByFilter("FieldName = '$fieldName'"); + $linkTracking->removeByFilter("\"FieldName\" = '$fieldName' AND \"SiteTreeID\" = $record->ID"); if(isset($linkedPages)) foreach($linkedPages as $item) { $linkTracking->add($item, array("FieldName" => $fieldName)); @@ -570,4 +570,4 @@ class HtmlEditorField_dropdown extends HtmlEditorField_control { class HtmlEditorField_break extends HtmlEditorField_control { } -?> \ No newline at end of file +?>