diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/error.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/error.html new file mode 100644 index 0000000000..67ef4ea112 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/error.html @@ -0,0 +1,2 @@ +
Something went wrong with this editor, below is the data stored:
+{{control | json}}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js
index f802173a25..11afb678a2 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js
@@ -572,18 +572,31 @@ angular.module("umbraco")
control.$index = index;
control.$uniqueId = $scope.setUniqueId();
+ //error handling in case of missing editor..
+ //should only happen if stripped earlier
+ if(!control.editor){
+ control.$editorPath = "views/propertyeditors/grid/editors/error.html";
+ }
+
if(!control.$editorPath){
var editorConfig = $scope.getEditor(control.editor.alias);
- control.editor = editorConfig;
- //if its a path
- if(_.indexOf(control.editor.view, "/") >= 0){
- control.$editorPath = control.editor.view;
+ if(editorConfig){
+ control.editor = editorConfig;
+
+ //if its a path
+ if(_.indexOf(control.editor.view, "/") >= 0){
+ control.$editorPath = control.editor.view;
+ }else{
+ //use convention
+ control.$editorPath = "views/propertyeditors/grid/editors/" + control.editor.view + ".html";
+ }
}else{
- //use convention
- control.$editorPath = "views/propertyeditors/grid/editors/" + control.editor.view + ".html";
+ control.$editorPath = "views/propertyeditors/grid/editors/error.html";
}
}
+
+
};