File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 11# Bulk Edit Changelog
22
3+ ## 2.0.3 - 2020-02-24
4+ ### Fixed
5+ - Bug where bulk editing a section with a field layout that had been deleted could yield no fields
6+
37## 2.0.2.1 - 2020-02-20
48### Fixed
59- Error that can occur if trying to bulkedit fields on a soft-deleted layout
Original file line number Diff line number Diff line change 11{
22 "name" : " venveo/craft-bulkedit" ,
3- "description" : " Bulk edit entries " ,
3+ "description" : " Bulk edit Craft CMS element fields " ,
44 "type" : " craft-plugin" ,
5- "version" : " 2.0.2.1 " ,
5+ "version" : " 2.0.3 " ,
66 "keywords" : [
77 " craft" ,
88 " cms" ,
Original file line number Diff line number Diff line change @@ -21,17 +21,16 @@ class EntryProcessor extends AbstractElementTypeProcessor
2121 */
2222 public static function getLayoutsFromElementIds ($ elementIds ): array
2323 {
24- $ layouts = FieldLayout ::find ()
25- ->select ('fieldlayouts.* ' )
24+ $ types = \ craft \ records \Entry ::find ()
25+ ->select ('entrytypes.fieldLayoutId ' )
2626 ->distinct (true )
2727 ->limit (null )
28- ->from ('{{%fieldlayouts}} fieldlayouts ' )
29- ->leftJoin ('{{%elements}} elements ' , '[[elements.fieldLayoutId]] = [[fieldlayouts.id]] ' )
30- ->where (['IN ' , '[[elements.id]] ' , $ elementIds ])
31- ->andWhere (['= ' ,'fieldlayouts.dateDeleted ' , null ])
32- ->all ();
28+ ->from ('{{%entries}} entries ' )
29+ ->leftJoin ('{{%entrytypes}} entrytypes ' , '[[entries.typeId]] = [[entrytypes.id]] ' )
30+ ->where (['IN ' , '[[entries.id]] ' , $ elementIds ])
31+ ->column ();
3332
34- return $ layouts ;
33+ return FieldLayout:: find ()-> where ([ ' IN ' , ' [[id]] ' , $ types ])-> all () ;
3534 }
3635
3736 /**
You can’t perform that action at this time.
0 commit comments