So i followed Pauls youtube guide how to get block lit previews up and running i v 10. Great tutorial. But for some reason i get an error no matter what i do.
[10:20:07 ERR] Error rendering preview for a block
System.ArgumentNullException: Value cannot be null. (Parameter 'type')
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Clean.Site.Controllers.BlockPreviewApiController.GetMarkupForBlock(BlockItemData blockData) in /Users/claushingebjerg/Downloads/Preview2/Clean.Site/Controllers/BlockPreviewApiController.cs:line 116
at Clean.Site.Controllers.BlockPreviewApiController.PreviewMarkup(BlockItemData data, Int32 pageId, String culture) in /Users/claushingebjerg/Downloads/Preview2/Clean.Site/Controllers/BlockPreviewApiController.cs:line 94
The only way to get it to work is downloading pauls demo project and running that. That works. But following the tutorial returns the above error.
I have even tried installing a project, and the pulling pauls data with usync. and moving the necessary files and foldes from Pauls project. But still get the error.
I cannot give you any concrete pointers, but it appears that in BlockPreviewApiController.cs on line 116, you are making a call to Activator.CreateInstance and you're passing null to the type argument.
I recommend using the debugger and see where the variable that you pass into that method comes from. You'll find more clues there.
The problem with the tutorial is that it does not pass any settings data so that will probably be your issue, there is a discussioon somewher on how to fix it, I'll dig out a link
Paul Seals Youtube Part 14 - Block List Previews
So i followed Pauls youtube guide how to get block lit previews up and running i v 10. Great tutorial. But for some reason i get an error no matter what i do.
The only way to get it to work is downloading pauls demo project and running that. That works. But following the tutorial returns the above error. I have even tried installing a project, and the pulling pauls data with usync. and moving the necessary files and foldes from Pauls project. But still get the error.
Any pointers to what i'm missing?
Hi,
I cannot give you any concrete pointers, but it appears that in
BlockPreviewApiController.cs
on line 116, you are making a call toActivator.CreateInstance
and you're passingnull
to the type argument. I recommend using the debugger and see where the variable that you pass into that method comes from. You'll find more clues there.Kind regards, Dennis
Yeah, thats the problem when a frontender copy/pastes code... Im not doing any of the above... It's code copied from the tutorial...
The problem with the tutorial is that it does not pass any settings data so that will probably be your issue, there is a discussioon somewher on how to fix it, I'll dig out a link
Have a read of this, see if it helps.
https://our.umbraco.com/forum/using-umbraco-and-getting-started/110114-append-settings-data-to-block-list-preview-model-generated-via-custom-api
is working on a reply...