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

Background image on hero background Element type throws error when rendered #17

Open
PeeDeeWhite opened this issue Dec 18, 2024 · 0 comments

Comments

@PeeDeeWhite
Copy link

If you select a background image for the hero element then you get the error

ArgumentNullException: Value cannot be null. (Parameter 'mediaWithCrops')

This is because the hero.cshtml partial is trying to find the 'image' property instead of 'background' image

var backgroundImage = Model.HasValue("backgroundImage") ? $"background-image:url({Model.Value<MediaWithCrops>("Image").GetCropUrl("hero")}); background-repeat: no-repeat; background-size: cover;" : string.Empty;

The product page also has this problem.

I will submit a fix for this shortly

PeeDeeWhite pushed a commit to PeeDeeWhite/UmbCheckout.StarterKit.Stripe that referenced this issue Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant