diff --git a/console/SiteMapController.php b/console/SiteMapController.php index ec27ca3..31ac892 100755 --- a/console/SiteMapController.php +++ b/console/SiteMapController.php @@ -42,7 +42,8 @@ public function getVariants() { - return Product::find() + return Product::find()->select('product.*', 'DISTINCT ON (product_id)') + ->with('lang') ->innerJoinWith('enabledVariants.lang'); } @@ -243,7 +244,6 @@ ); $this->createRow($url, 0.9, 'Daily'); } - foreach ($this->getVariants() ->each(1000) as $row) { /** -- libgit2 0.21.4