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

Block List Allowed Content Types Settings Issues #65

Closed
StephenBenson-MRM opened this issue Aug 30, 2024 · 6 comments
Closed

Block List Allowed Content Types Settings Issues #65

StephenBenson-MRM opened this issue Aug 30, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@StephenBenson-MRM
Copy link

Which Umbraco.Community.BlockPreview version are you using?

2.0.2

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

14.2.0

Bug summary

Hello!

Love your work!

Block List Allowed Content Types values added in appSettings don't seem to be respected

It seems to just be Block Previews for all Block List, or none

There is also some strange behaviour if you have any URL/ Document Pickers or Dropdowns inside a block, and, when you start nesting block grids / lists

I can't give you good repro steps for that and it could be a 14 issue and not the package based on how it saves the Data Types? I can raise a seperate bug if I can figure it out

Also, "umbraco" seems to be prepended to stylesheet links for Block Grids when viewing a preview.

Again, could be 14, but, have a rewrite to sort this one out. This happens whether the css file path is /path, ./path, or ~/path

Steps to reproduce

Add Content Type Aliases to the allowed content types for block list in appsettings
View the result

Expected result / actual result

Adding the alias for an Element/Document type into this list should show the preview, and not show previews for other block lists

@StephenBenson-MRM StephenBenson-MRM added the bug Something isn't working label Aug 30, 2024
@rickbutterfield
Copy link
Owner

Hey @s-benson-hugo-and-cat! Thanks for raising the issue. Please can you confirm what is in your appsettings.json? Just the BlockPreview section is fine.

There is definitely some strange behaviour with nesting things inside Blocks, I think for the most part that's a v14 issue that needs resolving.

The stylesheet issue is a known one that I've submitted a fix for in Umbraco 14.3 ( see umbraco/Umbraco.CMS.Backoffice#2213)

@StephenBenson-MRM
Copy link
Author

StephenBenson-MRM commented Aug 30, 2024

Hello, currently it is

"BlockPreview": {
"BlockGrid": {
"Enabled": true,
"ContentTypes": [
"articleListing",
"buttonCollection",
"carouselWithModal",
"centeredContentBlock",
"contacts",
"endcap",
"featuredContent",
"form",
"imageDefault",
"informationBlock",
"landingPageCards",
"listing",
"quickLinks",
"sirWebRichText",
"spotlight",
"stats",
"tabGroup",
"testimonial",
"textList",
"youTubeVideo"
],
"Stylesheet": "/assets/SirWeb/css/app.css"
},
"BlockList": {
"Enabled": false
}

If I change it to

  "BlockPreview": {
"BlockGrid": {
  "Enabled": true,
  "ContentTypes": [
    "articleListing",
    "buttonCollection",
    "carouselWithModal",
    "centeredContentBlock",
    "contacts",
    "endcap",
    "featuredContent",
    "form",
    "imageDefault",
    "informationBlock",
    "landingPageCards",
    "listing",
    "quickLinks",
    "sirWebRichText",
    "spotlight",
    "stats",
    "tabGroup",
    "testimonial",
    "textList",
    "youTubeVideo"
  ],
  "Stylesheet": "/assets/SirWeb/css/app.css"
},
"BlockList": {
  "Enabled": true
}

I see blocklist previews. If I then do:

  "BlockPreview": {
"BlockGrid": {
  "Enabled": true,
  "ContentTypes": [
    "articleListing",
    "buttonCollection",
    "carouselWithModal",
    "centeredContentBlock",
    "contacts",
    "endcap",
    "featuredContent",
    "form",
    "imageDefault",
    "informationBlock",
    "landingPageCards",
    "listing",
    "quickLinks",
    "sirWebRichText",
    "spotlight",
    "stats",
    "tabGroup",
    "testimonial",
    "textList",
    "youTubeVideo"
  ],
  "Stylesheet": "/assets/SirWeb/css/app.css"
},
"BlockList": {
  "Enabled": true,
  "ContentTypes": ["myBlockListIndividualElementAlias", "anyAliasFromTheAboveWorkingList"]
}

It will not show a preview for any of those elements

@rickbutterfield
Copy link
Owner

Hey @StephenBenson-MRM!

I have now confirmed that this is an issue with the Umbraco backoffice, and have raised a PR for it: umbraco/Umbraco.CMS.Backoffice#2515

@rickbutterfield
Copy link
Owner

This will be resolved in Umbraco 15.1, due for release on Thursday 12th December

@StephenBenson-MRM
Copy link
Author

Fantastic, thank you for the reply! 😄

@rickbutterfield
Copy link
Owner

@StephenBenson-MRM 15.1.0-rc has just been released and I can confirm that this is fixed! So you'll be able to use BlockPreview 3.0.0

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

2 participants