ckan
ckan copied to clipboard
Site logo missing when specified in ckan.ini
CKAN version Master - 2.10a
Describe the bug The site logo image is not displayed. I have not set one via the sysadmin config UI, but do have a ckan.site_logo entry in my ckan.ini, a configuration that worked in 2.9.
Expected behavior I expect the provided logo to be displayed. Instead text for the site title is shown. Looking at the header.html file it appears g.site_logo may not be set with the value from ckan.ini
It seems to work for me though, something related was previously discussed https://github.com/ckan/ckan/issues/6111,
but if it can be reproduced, this should be a simple fix.
@Zharktas here is some more detail
Steps to recreate issue
- Set site logo image in ckan.ini to a partial file path that does not start with '/base/images/'
- Go to the sysadmin config page and click reset - the logo should work
- Click Update Config and the image will be broken.
My Analysis I did a little digging to see if this was an issue I could handle. It appears the logic on the config page treats the partial path as if it is an upload (doesn't start with http). The default ckan logo works because there is a special case in the image-upload.js allowing files from /base/images/ to be treated differently. Other file locations result in the site_logo config being uploaded and eventually and stored to uploads/admin which is prepended to the filename.
I attempted to alter the config.html so the partial paths would be treated as links instead of uploads, but this fails some validation prior to form submission and blocks that action. This highlights a secondary issue in that partial paths are valid for the site logo, but there is no way to enter them into the config UI.
hi @pdekraker-epa I would like to contribute on this issue.
hi @pdekraker-epa I would like to contribute on this issue.
@Vishal-NEC Thanks for showing your interest. Can you share your analysis on this issue first.
@Vishal-NEC This issue is fixed in CKAN 2.9.3 release.