ProvidenceGeeks / website-frontend

UI frontend repository for the Providence Geeks website
https://www.pvdgeeks.org
7 stars 9 forks source link

blog post (without a large image) not loading #148

Closed thescientist13 closed 6 years ago

thescientist13 commented 6 years ago

Type of Change

Summary

  1. A recently published blog post is not displaying due to a console error
  2. stage and prod
  3. Exact steps to reproduce (example below)
    1. Go to https://.pvdgeeks.org/post/21
  4. Expected result: It should load the blog post
  5. Actual result: It loads an empty page, with an error showing in the console
  6. Error message (if applicable)
screen shot 2018-04-06 at 9 16 18 pm
4.686a89752102f8984db6.js:1 Uncaught (in promise) TypeError: Cannot read property 'source_url' of null
    at 4.686a89752102f8984db6.js:1

cc: @mobilejoel

thescientist13 commented 6 years ago

looks like the issue is that the app is expecting a large version of the image to be available from the CMS

backgroundImage: selectedPost.media_details.large.source_url,
screen shot 2018-04-06 at 9 32 04 pm

Will try and implement some sort of fallback to the next best image, otherwise will fallback to nothing.