Skip to content

Commit 079f0cb

Browse files
committed
Fixed issue Item with the same ID X already exists
1 parent e65ef76 commit 079f0cb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Model/ResourceModel/Category/Collection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ protected function _renderFiltersBefore()
196196
['store_table' => $this->getTable('magefan_blog_category_store')],
197197
'main_table.category_id = store_table.category_id',
198198
[]
199+
)->group(
200+
'main_table.category_id'
199201
);
200202
}
201203
parent::_renderFiltersBefore();

Model/ResourceModel/Post/Collection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,8 @@ protected function _renderFiltersBefore()
400400
[$key.'_table' => $this->getTable('magefan_blog_post_'.$key)],
401401
'main_table.post_id = '.$key.'_table.post_id',
402402
[]
403+
)->group(
404+
'main_table.post_id'
403405
);
404406
}
405407
}

0 commit comments

Comments
 (0)