CKAN version: 2.12.0 (also 2.11.x, 2.10.4 and master)
Describe the bug
Every page with a DataTables view logs a 404 for:
/webassets/ckanext-datatablesview/vendor/FontAwesome/images/times-circle-solid.svg
ckanext/datatablesview/assets/datatables_view.css sets the icon for the search input's cancel button with a relative URL:
input[type="search"]::-webkit-search-cancel-button {
...
background-image: url('vendor/FontAwesome/images/times-circle-solid.svg');
}
The CSS is served as part of the ckanext-datatablesview/main-css webassets bundle (output ckanext-datatablesview/%(version)s_datatablesview.css, no filters), so the relative URL resolves under /webassets/ckanext-datatablesview/, where only the bundle output exists. On 2.10 the SVG is reachable at /vendor/FontAwesome/images/times-circle-solid.svg (the extension's public/ folder), but the bundled CSS never points there; from 2.11 the SVG sits in assets/, which isn't served at all.
The effect is cosmetic: the "x" clear button in the column filter boxes is missing in WebKit/Blink browsers. Filtering still works.
Steps to reproduce
- CKAN 2.12 with
datatables_view enabled.
- Open a resource page with a table preview.
- Browser network tab: 404 for
times-circle-solid.svg. Type into a column filter box in Chrome - no clear icon.
Expected behaviour
The icon loads and no 404 is logged.
Suggested fix
Inline the SVG as a data URI in datatables_view.css, so the icon doesn't depend on a file being served, and drop the now-unused assets/vendor/FontAwesome/. It's the only reference to that file. I'll open a PR.
CKAN version: 2.12.0 (also 2.11.x, 2.10.4 and master)
Describe the bug
Every page with a DataTables view logs a 404 for:
ckanext/datatablesview/assets/datatables_view.csssets the icon for the search input's cancel button with a relative URL:The CSS is served as part of the
ckanext-datatablesview/main-csswebassets bundle (outputckanext-datatablesview/%(version)s_datatablesview.css, no filters), so the relative URL resolves under/webassets/ckanext-datatablesview/, where only the bundle output exists. On 2.10 the SVG is reachable at/vendor/FontAwesome/images/times-circle-solid.svg(the extension'spublic/folder), but the bundled CSS never points there; from 2.11 the SVG sits inassets/, which isn't served at all.The effect is cosmetic: the "x" clear button in the column filter boxes is missing in WebKit/Blink browsers. Filtering still works.
Steps to reproduce
datatables_viewenabled.times-circle-solid.svg. Type into a column filter box in Chrome - no clear icon.Expected behaviour
The icon loads and no 404 is logged.
Suggested fix
Inline the SVG as a data URI in
datatables_view.css, so the icon doesn't depend on a file being served, and drop the now-unusedassets/vendor/FontAwesome/. It's the only reference to that file. I'll open a PR.