rickbutterfield / Umbraco.Community.BlockPreview

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

Previews missing after updating to 1.10.0 #64

Closed OwainJ closed 1 month ago

OwainJ commented 2 months ago

Which Umbraco.Community.BlockPreview version are you using?

1.10.0

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

13.4.1

Bug summary

After updating to v1.10.0, the block previews are no longer shown. image

There are no errors in the browser's console, or the Umbraco log.

v1.9.1 works as expected: image

The above screenshots are taken from a project that uses the Block List, but I have also observed the issue on a project that uses the Block Grid.

Steps to reproduce

Expected result / actual result

No response

rickbutterfield commented 2 months ago

Thanks for raising so quickly @OwainJ! I've deprecated this version on NuGet as I have managed to replicate, but only when installed from there. Will do some digging and let you know once there's a new version out.

rickbutterfield commented 2 months ago

@OwainJ out of curiosity, is the doctype you're looking at primarily made up of compositions?

OwainJ commented 2 months ago

@rickbutterfield Yup, it is, the Block List property is from a composition. image

And it's the same on my other project, where the Block Grid is also from a composition.

rickbutterfield commented 2 months ago

@OwainJ Thought so! Please give v1.10.1 a go and let me know how you get on 😁

OwainJ commented 2 months ago

Hi @rickbutterfield, unfortunately I'm seeing the same thing in v1.10.1; downgrading to v1.9.1 and they show up again. No errors in the console or log either.

I'll see if I can recreate this on a vanilla project tomorrow and share a .zip here, although I'm on an Umbraco course in the morning, so would be in the afternoon sometime.

katie366 commented 1 month ago

I am having the same issue after installing version 1.10.3 in 13.4.1. Did anyone find a solution? Thank you

OwainJ commented 1 month ago

Apologies, I didn't get around to testing the new release and it completely slipped my mind!

I've just done a quick test with a fresh install and I get the same issue: image

Here's a .zip of the test project: BlockPreview_1-10-3_Test.zip

rickbutterfield commented 1 month ago

Thanks for the test project @OwainJ! The issue here appears to be that ModelsBuilder isn't enabled. Unfortunately the package doesn't work without this enabled as it tries to strongly type the data coming from the backoffice!

I'll add a note to the README about having ModelsBuilder enabled. Is there a use case for you where you'd want to use this without ModelsBuilder? (or @katie366 - I'd be curious to see if it's the same for you!)

OwainJ commented 1 month ago

Ahh what silly mistake lol my bad! I have no use case, I just forgot to enable it on the test project.

I've re-tested with Models Builder enabled, and can confirm that it works with the Block Grid, but weirdly, the Block List previews seem to just repeat the preview of the first block: Block List Preview Test

Here's an updated test project with models builder enabled: BlockPreviewTest_1-10-3_Test-2.zip

I also tested on one of my client's projects, where v1.9.1 works as expected, v1.10.1 showed no previews, and v1.10.3 has the weird repeating issue on Block List previews:

v1.9.1 screenshot ![image](https://github.com/user-attachments/assets/bef18eb0-99d2-4f25-8acb-2740147f2a8e)
v1.10.1 screenshot ![image](https://github.com/user-attachments/assets/30ef3b92-cf0f-46d3-938e-3a4f7c48e502)
v1.10.3 screenshot ![image](https://github.com/user-attachments/assets/abe243df-cbaa-4a15-bd0e-68153875eb2b)

Edit: The blocklist on v1.10.2 behaves the same as v1.10.3

katie366 commented 1 month ago

I have also enabled Models Builder, and have upgraded to v1.10.3 and have got it working. I don't have the repetition or the preview blocks.

Thank you

rickbutterfield commented 1 month ago

@OwainJ v1.10.4 is being released right now, with a fix for this!

OwainJ commented 1 month ago

Legend 😄 happy to report that v1.10.4 is working nicely!