wildlifetrusts / nextdoornature

https://team-wilder-proto.pages.dev/
2 stars 1 forks source link

[Bug]: Site content not being imported #688

Closed katjam closed 5 months ago

katjam commented 5 months ago

Description

Site deploy successful but content not found.

Traced back to https://github.com/wildlifetrusts/nextdoornature/commit/bcdbf9d8e0b76868837608fbb3acbb8d69c03981

katjam commented 5 months ago

reported by @igeisking.

I have reverted temporarily so the site content is back up. I will investigate cause this evening and report back (hopefully with a fix)

katjam commented 5 months ago

Looks like it's being caused by missing alt text! image

katjam commented 5 months ago

This is because we can't enforce alt text being optional when there is no image. I'll work around with a default empty value so it can't happen for this reason again.

katjam commented 5 months ago

@igeisking @joe-rswt To clarify what I've done.

Because we can't enforce in the content editor to allow an image without alt text due to limitations on the way Decap CMS works, this might have been able to happen again.

My solution is to add an empty alt text if one does not exist. I have only done this for story images. It means to a screenreader, the images are not there because empty alt text indicates that the image is not contextually important. So you should add the alt text if you want it to be there, but at least the site won't break now if you accidentally save without.