Hi,
Since 9.7 we can't use codefirst item in frontend. Templates crash when getting the item as codefirst objects like:
var exampleItem = Services.Items.GetItemById<ExampleItem>("1");
It throws an exception because Dad is not happy...
Is there a fix for this? Because we use codefirst items on most of our templates.
System.Exception: Translate.Translate or Translate.JsTranslate was called from the frontend. Dad is not happy.... Just remove the call in that context. UI needs to be translated in Admin - not in the API at Dynamicweb.SystemTools.Translate.GetWord(String key, Boolean isJavaScript) at Dynamicweb.SystemTools.Translate.Translate(String key) at Dynamicweb.Content.Items.Activation.CodeFirstActivationWorkflow.GetPropertiesGroupInfo(IEnumerable`1 properties, Dictionary`2 groupFields) at Dynamicweb.Content.Items.Activation.CodeFirstActivationWorkflow.SelectLayout(IEnumerable`1 properties, FieldMetadataCollection fieldsMetadata) at Dynamicweb.Content.Items.Activation.CodeFirstActivationWorkflow.SelectItem(Type t) at Dynamicweb.Content.Items.ItemManager.GetSystemName(Type itemType) at Dynamicweb.Content.Items.Queries.StorageManager.Open[T]() at Dynamicweb.Content.Items.Queries.StorageManager.GetById[T](String id) at CompiledRazorTemplates.Dynamic.RazorEngine_8f0162f016e343e69eb53d45582916bc.Execute() at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.Template.RenderRazorTemplate()