Bug #18371
closed
Images not loading correctly after upgrading from 1.13.2 to 1.14.1
Added by Josh Baird almost 8 years ago.
Updated over 7 years ago.
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.
Files
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.
- Related to Feature #16372: Convert the header logo to svg so that it scales better added
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.
Confirmed the Apache snippet fixes this issue. Thanks, Dominic!
- 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.
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