diff --git a/src/Extensions/SearchDocumentGenerator.php b/src/Extensions/SearchDocumentGenerator.php index cb0ac05..13046d1 100644 --- a/src/Extensions/SearchDocumentGenerator.php +++ b/src/Extensions/SearchDocumentGenerator.php @@ -27,6 +27,7 @@ public function getGenerateSearchLink() $mode = Versioned::get_reading_mode(); Versioned::set_reading_mode('Stage.Live'); $link = Director::absoluteURL($owner->Link()); + $link = str_replace('stage=Stage', '', $link); Versioned::set_reading_mode($mode); if(strpos($link, '?') !== false) { return $link . '&SearchGen=1';