Please describe what you are doing to trigger the bug:
Naming a storage with a digit as first character (e.g.: “2TB_storage”).
Please describe what you expect to happen (but doesn’t):
The size, revisions and chunks graphs should show in the storage page.
Please describe what actually happens (the wrong behaviour):
No graphs are displayed. Instead, the space where the graphs should be is just empty.
This execption is thrown:
chartist.js:154 Uncaught DOMException: Failed to execute ‘querySelector’ on ‘Document’: ‘#2TB_storageChartSize’ is not a valid selector.
at Object.c.querySelector (https://cdnjs.cloudflare.com/ajax/libs/chartist/0.11.0/chartist.min.js:8:1080)
at e.i [as constructor] (chartist.min.js:8:15286)
at e [as constructor] (chartist.min.js:8:30501)
at Object.f [as Line] (chartist.min.js:8:13468)
at HTMLDocument. (storage:2183:18)
at c (jquery.min.js:4:26036)
at Object.fireWith [as resolveWith] (jquery.min.js:4:26840)
at Function.ready (jquery.min.js:4:3305)
at HTMLDocument.q (jquery.min.js:4:717)
My guess why this exception is thrown is because the storage name is used as the prefix for various element ids, but ids are only valid when they start with a letter (“In CSS, identifiers (including element names, classes, and IDs in selectors) … cannot start with a digit, two hyphens, or a hyphen followed by a digit” CSS Spec).
I would suggest using a static prefix for the ids (e.g.: “id_2TB_storageChartSize”) or the selector “[id=“2TB_storage”]” instead of “#2TB_storage”.