owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.35k stars 227 forks source link

🐛 fix research-and-writing links still rendering on bake even when content is invalid #3609

Closed ikesau closed 1 month ago

ikesau commented 1 month ago

The research and writing block had an incorrectly implemented fallback for when linked documents were invalid.

If there's an error and we're previewing, we show a red warning block. If we're not previewing (i.e. baking), we should return null.

This was noticed because an unpublished gdoc that was being linked to in the CO₂ topic page was showing up as an empty tile.

error
owidbot commented 1 month ago
Quick links (staging server): Site Admin Wizard

Login: ssh owid@staging-site-research-and-writing-component-error-rendering

SVG tester: Number of differences (default views): 0 Number of differences (all views): 0

Edited: 2024-05-15 18:47:09 UTC Execution time: 1.17 seconds