[Bug]: Card component examples are failing in the latest version of the design system within the Jinja environment.
Closed this issue · 0 comments
Describe the bug
All card component examples are failing with an internal server error in the Jinja environment using the latest design system version 70.0.11. The issue is caused by a missing else statement in the condition that checks params.image.placeholderURL
Expected behaviour / outcome
All card component examples should function in design-system-python-flask-demo as they do in the design system
List the steps necessary to reproduce the bug
Clone the design-system-python-flask-demo branch and checkout to the load-ds-templates-in-jinja branch.
Run make run which renders all the example components as displayed in the Design System at http://127.0.0.1:5000.
Navigate to the card component and see all the examples fail with internal server error
Additional context
How to fix this issue:
Replace line 5 : {% set placeholderSrcset = (params.image.placeholderURL if params.image.placeholderURL) + "/img/small/placeholder-card.png 1x, " + (params.image.placeholderURL if params.image.placeholderURL else "") + "/img/large/placeholder-card.png 2x" %}
with
{% set placeholderSrcset = (params.image.placeholderURL if params.image.placeholderURL else “”) + "/img/small/placeholder-card.png 1x, " + (params.image.placeholderURL if params.image.placeholderURL else "") + "/img/large/placeholder-card.png 2x" %}
What version of the ONS Design System are you using?
70.0.11
What device(s) are you using?
Desktop
What operating system(s) are you using?
macOS
What browser(s) are you using?
Chrome