rickbutterfield / Umbraco.Community.BlockPreview

Easy to use rich HTML backoffice previews for the Umbraco Block List and Block Grid editors.
MIT License
15 stars 10 forks source link

Umbraco 13.2.0. Error with empty RTEs #48

Closed AlexanderWagner82 closed 5 months ago

AlexanderWagner82 commented 5 months ago

I get this error with Umbraco.Community.BlockPreview 1.8.1 and Umbraco.CMS 13.2.0 on empty RTE-properties.

It works just fine with Umbraco.Community.BlockPreview 1.8.0 and Umbraco.CMS 13.1.0

System.NullReferenceException: Object reference not set to an instance of an object. at Umbraco.Community.BlockPreview.Services.BackOfficeListPreviewService.GetMarkupForBlock(IPublishedContent page, BlockValue blockValue, String blockEditorAlias, ControllerContext controllerContext, String culture) at Umbraco.Community.BlockPreview.Controllers.BlockPreviewApiController.PreviewMarkup(BlockValue data, Int32 pageId, String blockEditorAlias, Boolean isGrid, String culture)

image

rickbutterfield commented 5 months ago

You've found a real edge case here! I've also managed to replicate the error in 13.1.1, so it's a bug in BlockPreview. Look out for v1.8.2 coming later on today

AlexanderWagner82 commented 5 months ago

Awesome! Thank you very much :)

rickbutterfield commented 5 months ago

@AlexanderWagner82 should be fixed in v1.8.2 if you could please check and confirm? It worked in my test case

AlexanderWagner82 commented 5 months ago

I've tested with Umbraco 13.2.0 and BlockPreview 1.8.2 and it works like a charm now.

Thank you for a fast reply and fix!