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

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

Merged
merged 1 commit into from
May 17, 2024

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented May 15, 2024

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

@ikesau ikesau requested a review from mlbrgl May 15, 2024 18:37
@ikesau ikesau self-assigned this May 15, 2024
@owidbot
Copy link
Contributor

owidbot commented May 15, 2024

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

Copy link
Member

@mlbrgl mlbrgl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks!

Confirmed locally (dev and bake)

Screenshot 2024-05-16 at 19 15 25 Screenshot 2024-05-16 at 21 29 30

@ikesau ikesau merged commit 359a612 into master May 17, 2024
32 checks passed
@ikesau ikesau deleted the research-and-writing-component-error-rendering branch May 17, 2024 12:16
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

Successfully merging this pull request may close these issues.

None yet

3 participants