Project

General

Profile

Bug #18371

Images not loading correctly after upgrading from 1.13.2 to 1.14.1

Added by Josh Baird over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

I just did an RPM based upgrade from 1.13.2 to 1.14.1 and now I have some broken images/etc in the UI. I have cleared cache, executed a 'hard reload' in Chrome, and tried from a fresh Firefox with the same results. 'foreman-rake tmp:cache:clear' and 'foreman-rake tmp:sessions:clear' was also executed after the upgrade.

No errors in the console. I did notice that in 1.14.1, the header logo is a SVG and in 1.13.x it's a PNG. When I try to browse to the SVG directly, my browser returns this error:

"error on line 1 at column 1: Encoding error"

Screenshots are attached.

foreman-header-broken-svg.png View foreman-header-broken-svg.png 6.8 KB Josh Baird, 02/02/2017 10:02 AM
foreman-header-console.png View foreman-header-console.png 33.6 KB Josh Baird, 02/02/2017 10:02 AM
foreman-header-firefox.png View foreman-header-firefox.png 21 KB Josh Baird, 02/02/2017 10:02 AM
foreman-header-chrome.png View foreman-header-chrome.png 5.78 KB Josh Baird, 02/02/2017 10:02 AM
Foreman header broken svg Foreman header console Foreman header firefox Foreman header chrome

Related issues

Related to Foreman - Feature #16372: Convert the header logo to svg so that it scales betterClosed2016-08-29

History

#1 Updated by Martin Dobrev over 3 years ago

I can reproduce the problem. Seems to be existing since 1.14.0. I'm using RPM packages and EL7.

Josh Baird wrote:

I just did an RPM based upgrade from 1.13.2 to 1.14.1 and now I have some broken images/etc in the UI. I have cleared cache, executed a 'hard reload' in Chrome, and tried from a fresh Firefox with the same results. 'foreman-rake tmp:cache:clear' and 'foreman-rake tmp:sessions:clear' was also executed after the upgrade.

No errors in the console. I did notice that in 1.14.1, the header logo is a SVG and in 1.13.x it's a PNG. When I try to browse to the SVG directly, my browser returns this error:

"error on line 1 at column 1: Encoding error"

Screenshots are attached.

#2 Updated by Dominic Cleal over 3 years ago

  • Related to Feature #16372: Convert the header logo to svg so that it scales better added

#3 Updated by Dominic Cleal over 3 years ago

This appears to occur when using 1.14 with the installer-supplied Apache config from 1.13 or older, which attempts to send clients gzipped assets when possible. The svg is also supplied as svg.gz, so the gzipped content is preferred.

Without https://github.com/theforeman/puppet-foreman/commit/568f278 then you'll get the encoding error as the content type's not set correctly, I think. If using the installer, try re-running it after the upgrade to ensure the SVG section is added to the Apache config, or if using our modules then ensure you're using puppet-foreman 6.0.0 or higher.

If you have this section in your Apache config, please update foreman-header-console.png to show all of the response headers.

#4 Updated by Josh Baird over 3 years ago

Confirmed the Apache snippet fixes this issue. Thanks, Dominic!

#5 Updated by Dominic Cleal over 3 years ago

  • Status changed from New to Resolved

Thanks for confirming. Since I don't think there's any solution apart from updating (preferably) or removing that section, I'll resolve this.

I have however opened https://github.com/theforeman/puppet-foreman/pull/528 to make the block only match known file types, so any future new .gz files missing content-type information don't break.

#6 Updated by Carlos Maldonado over 3 years ago

Josh Baird wrote:

Confirmed the Apache snippet fixes this issue. Thanks, Dominic!

Confirmed on my side, I had this issue too

CM

Also available in: Atom PDF