Developer forum

Forum » Dynamicweb 10 » Change fonts
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have started working on a DW10 project.
The setup worked pretty well, using Swift Fiels and Swift Database.

The first error I got was after changing the fonts. The default font is Inter and I wanted to change it to Poppins.

The interface does not allow for searching, therefore I just typed in the name of the family (Poppins in this case) upon "Save and close" there was a check performed on the page and all selections were marked with green (I suppose it means ok).

But when trying to preview the page, I got this error:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Dynamicweb.Frontend.ContentViewModelFactory.CreateGoogleFontViewModel(GoogleFont font)
   at Dynamicweb.Content.Items.Editors.GoogleFontEditor.GetViewModelValue(GoogleFontEditor googleFontEditor, Object value)
   at Dynamicweb.Content.Items.Editors.GoogleFontEditor.GetViewModelValue(Object value)
   at Dynamicweb.Content.Items.Editors.Editor.GetViewModelValue(Object value, ItemField field)
   at Dynamicweb.Frontend.ContentViewModelFactory.GetValue(ItemField field, Item item, Object value)
   at Dynamicweb.Frontend.ContentViewModelFactory.<>c__DisplayClass12_1.<CreateItemFieldViewModel>g__modelValueFactory|0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Dynamicweb.Frontend.ItemFieldViewModel.GetValue()
   at Dynamicweb.Frontend.ItemFieldViewModel.GetValue[T]()
   at Dynamicweb.Frontend.ItemFieldViewModel.GetGoogleFont()
   at Dynamicweb.Frontend.ItemViewModel.GetGoogleFont(String systemName)
   at CompiledRazorTemplates.Dynamic.RazorEngine_29f4903a3d10415ea48e521e48c5aa45.ExecuteAsync()
   at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String templateSource, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

 

What is missing?

Thank you,
Adrian


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Adrian

This has been fixed in the latest Dynamicweb 10 release, aka 10.0.0 - the final.

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you!

This is good news. Both the fix and the release.

Thank you,

Adrian

 

You must be logged in to post in the forum