From 3b17c4478e60e8e1aa9ea0c60ebfb64a0946c20d Mon Sep 17 00:00:00 2001 From: Max Girkens Date: Thu, 21 Jun 2018 13:23:08 +0200 Subject: [PATCH] BlogTag existing check on URLSegment perform existing check for BlogTag on URLSegment rather than Title. Title is non unique in the Database, thus allows (ci) duplicates in legacy entries --- code/model/BlogTag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/model/BlogTag.php b/code/model/BlogTag.php index 47c9e57..65ec226 100644 --- a/code/model/BlogTag.php +++ b/code/model/BlogTag.php @@ -88,7 +88,7 @@ class BlogTag extends DataObject implements CategorisationObject // Check for duplicate tags $blog = $this->Blog(); if($blog && $blog->exists()) { - $existing = $blog->Tags()->filter('Title', $this->Title); + $existing = $blog->Tags()->filter('URLSegment', $this->URLSegment); if($this->ID) { $existing = $existing->exclude('ID', $this->ID); }