Bug #7487
Bullet points visible next to dashboard widgets
Description
When viewing the dashboard on a source or production installation with precompiled assets, bullet points are visible to the left of dashboard widgets. This doesn't happen on a development source install (only when precompiled), or on RPM installations - it's probably specific to certain versions of gems.
It appears that some high Unicode character is getting compiled into the assets:
# source install $ egrep -o "..gridster ul" public/assets/application.css | xxd 0000000: efbb bf2e 6772 6964 7374 6572 2075 6c0a ....gridster ul. # Ubuntu 14.04 with 1.6.0 # egrep -o "..gridster ul" /var/lib/foreman/public/assets/application.css | xxd 0000000: efbb bf2e 6772 6964 7374 6572 2075 6c0a ....gridster ul. # EL6 with nightly # egrep -o "..gridster ul" /var/lib/foreman/public/assets/application.css | xxd 0000000: 7d2e 6772 6964 7374 6572 2075 6c0a }.gridster ul.
If I edit the compiled asset files on disk and refresh, the bullet points disappear.
Associated revisions
fixes #7487 - remove unused background-image containing UTF-8 character
UTF-8 was causing BOMs to appear in the precompiled CSS, which then prevented
these styles being applied, so bullet points appeared on the dashboard.
(cherry picked from commit 5355b6b62a107b691572367883314f0e287438cd)
History
#1
Updated by Dominic Cleal over 8 years ago
I'm still seeing this, and can now reproduce it on an RPM installation when sass is updated from 3.2.13 to 3.4.9. For now, I'm not going to upgrade it.
#2
Updated by Dominic Cleal over 8 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
https://github.com/sass/sass/commit/2b87b837 introduced the behaviour change in sass 3.4.0, where (if I understand it correctly) use of UTF-8 in stylesheets would result in a BOM character being added to the output stylesheet. I think when the output stylesheets are concatenated together with sprockets, the BOM is just being put in the middle (maybe a sprockets bug?) and isn't usable.
We have two pieces of UTF-8 that I can see in our stylesheets, which don't appear to be deliberate - a … character in the middle of some base64.
https://github.com/theforeman/foreman/blob/1.7.0-RC2/app/assets/stylesheets/gridster.scss#L173
https://github.com/theforeman/foreman/blob/1.7.0-RC2/app/assets/stylesheets/charts.scss#L7
#3
Updated by The Foreman Bot over 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/1985 added
- Pull request deleted (
)
#4
Updated by Dominic Cleal over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 5355b6b62a107b691572367883314f0e287438cd.
#5
Updated by Dominic Cleal over 8 years ago
- Legacy Backlogs Release (now unused) set to 21
fixes #7487 - remove unused background-image containing UTF-8 character
UTF-8 was causing BOMs to appear in the precompiled CSS, which then prevented
these styles being applied, so bullet points appeared on the dashboard.