You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a registered custom icon uses single quotes to define the id, the all_icons context variable doesn't recognise the icon name (i.e. the name attribute is empty). These icons behave as expected elsewhere in the admin interface.
When the styleguide template loops through the custom icons, the icon template tag is called with an empty name attribute causing the 500 error (ref).
{%iconname=item.nameclassname="w-w-8 w-h-8"%}
Steps to Reproduce
Add a custom svg to your project with the id defined with single quotes:
<svgviewBox="0 0 1024 1024"id='icon-ban'xmlns="http://www.w3.org/2000/svg"xmlns:svg="http://www.w3.org/2000/svg">
<pathd="M 734.4,825 199,289.6 C 154.2,352.2 128,429 128,512 c 0,212 172,384 384,384 83,0 159.8,-26.2 222.4,-71 z M 825,734.4 C 869.8,671.8 896,595 896,512 896,300 724,128 512,128 429,128 352.2,154.2 289.6,199 Z M 0,512 a 512,512 0 1 1 1024,0 512,512 0 1 1 -1024,0 z"style="stroke-width:2"
/>
</svg>
Issue Summary
If a registered custom icon uses single quotes to define the
id
, theall_icons
context variable doesn't recognise the icon name (i.e. the name attribute is empty). These icons behave as expected elsewhere in the admin interface.When the styleguide template loops through the custom icons, the icon template tag is called with an empty name attribute causing the 500 error (ref).
Steps to Reproduce
Add a custom svg to your project with the id defined with single quotes:
Register the icon as per docs.
Browse the style guide - the error is thrown in the icon template tag due to missing icon name.
Technical details
The text was updated successfully, but these errors were encountered: