Umbraco.Community.BlockPreview icon indicating copy to clipboard operation
Umbraco.Community.BlockPreview copied to clipboard

Issue with models mode set to none

Open adayinthelifeofapro opened this issue 11 months ago • 8 comments

Which Umbraco.Community.BlockPreview version are you using?

1.11.0

Which Umbraco version are you using? For example: 10.4.0 - don't just write v10

13.5.3

Bug summary

If the models mode is set to none, the following warnings appear on block preview

Image

Steps to reproduce

Set models mode to none in config

Expected result / actual result

Block Preview should still work when the models mode is set to none

adayinthelifeofapro avatar Jan 22 '25 14:01 adayinthelifeofapro

Hi @adayinthelifeofapro - this is correct functionality and a new feature to surface this error. BlockPreview has always required the presence of strongly typed models to generate the previews

rickbutterfield avatar Jan 22 '25 15:01 rickbutterfield

Hi @rickbutterfield this causes an issue when the site is running on Umbraco Cloud staging or production sites, as they specify that the ModelsBuilder mode should be set to Nothing, see error log screenshot below:

Image

Setting the ModelsBuilder mode to SourceCodeManual or SourceCodeAuto causes a boot failure to occur on the Umbraco Cloud website

adayinthelifeofapro avatar Jan 22 '25 19:01 adayinthelifeofapro

@adayinthelifeofapro Ah, that is a very good point! Back to the drawing board on this one...

rickbutterfield avatar Jan 22 '25 19:01 rickbutterfield

@adayinthelifeofapro hoping to have a fix for this out tomorrow

rickbutterfield avatar Jan 23 '25 17:01 rickbutterfield

@adayinthelifeofapro v1.12.0 is now on NuGet, please give it a try and report back!

rickbutterfield avatar Jan 24 '25 11:01 rickbutterfield

This is still an issue for us on Umbraco 13.5.3. We have models mode set to "Nothing" and previews only work on version 1.8.2 and below. All versions above that break the previews and causes instability in backoffice.

Wolfkhan66 avatar Feb 04 '25 16:02 Wolfkhan66

@Wolfkhan66 please can you confirm the following:

  • Generated models exist on disk in the environment you're in?
  • Are you seeing any errors on the previews at all? Specifically in v1.12 there should be errors shown if the preview cannot load for some reason

rickbutterfield avatar Feb 04 '25 16:02 rickbutterfield

@adayinthelifeofapro @Wolfkhan66 There should be better error handling in v1.13.0, please can you try and report back?

rickbutterfield avatar Apr 25 '25 12:04 rickbutterfield