File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -105,15 +105,21 @@ public function load($objectIds) {
105105 }
106106 else {
107107 if (!isset ($ this ->fullyLoaded [$ ref [0 ]])){
108- $ alias = $ this ->contentTypeService ->getByName ($ ref [0 ])->getEnvironment ()->getAlias ();
109- if ($ alias ){
110- if (!array_key_exists ($ alias , $ queries )){
111- $ queries [$ alias ] = ['docs ' => []];
108+ $ contentType = $ this ->contentTypeService ->getByName ($ ref [0 ]);
109+ if ($ contentType ){
110+ $ alias = $ contentType ->getEnvironment ()->getAlias ();
111+ if ($ alias ){
112+ if (!array_key_exists ($ alias , $ queries )){
113+ $ queries [$ alias ] = ['docs ' => []];
114+ }
115+ $ queries [$ alias ]['docs ' ][] = [
116+ "_type " => $ ref [0 ],
117+ "_id " => $ ref [1 ],
118+ ];
119+ }
120+ else {
121+ $ this ->session ->getFlashBag ()->add ('warning ' , 'ems was not able to find the alias for the content type " ' .$ ref [0 ].'" ' );
112122 }
113- $ queries [$ alias ]['docs ' ][] = [
114- "_type " => $ ref [0 ],
115- "_id " => $ ref [1 ],
116- ];
117123 }
118124 else {
119125 $ this ->session ->getFlashBag ()->add ('warning ' , 'ems was not able to find the content type " ' .$ ref [0 ].'" ' );
You can’t perform that action at this time.
0 commit comments