Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with models mode set to none #89

Open
adayinthelifeofapro opened this issue Jan 22, 2025 · 7 comments
Open

Issue with models mode set to none #89

adayinthelifeofapro opened this issue Jan 22, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@adayinthelifeofapro
Copy link

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 adayinthelifeofapro added the bug Something isn't working label Jan 22, 2025
@rickbutterfield
Copy link
Owner

rickbutterfield commented Jan 22, 2025

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

@adayinthelifeofapro
Copy link
Author

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

@rickbutterfield
Copy link
Owner

rickbutterfield commented Jan 22, 2025

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

@rickbutterfield
Copy link
Owner

@adayinthelifeofapro hoping to have a fix for this out tomorrow

@rickbutterfield
Copy link
Owner

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

@Wolfkhan66
Copy link

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.

@rickbutterfield
Copy link
Owner

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants