The site logo settings in my sub-theme don't have any effect (visibility and selecting a new logo). Here is what I did:

  • created a sub-theme of "Wetkit bootstrap" using drush.
  • Both are enabled and the new sub-theme is set as default.
  • in my subtheme settings: If I upload a new logo it does not change the displayed logo nor does the 'toggle display' setting have any effect. All other theme settings work.
  • However, the logo settings Do work in the parent theme, 'Wetkit-Bootstrap' which is enabled but not set as default.

Any idea what is going on?

Comments

sylus’s picture

This took me quite a while to figure out but yes your correct and it was largely to do with code similar to the following in wetkit_bootstrap_preprocess_page:

theme_get_setting('default_logo', 'wetkit_bootstrap');

Instead of:

theme_get_setting('default_logo');

Where the second code snippet will just use the current theme and not be hard set to 'wetkit_bootstrap'.

Unfortunately that was only one of the problems as some of the conditional logic just was not properly working, I have refactored all of this logic and tested on both 'wetkit_bootstrap' and a derived subtheme and everything appears to be in order.

One slight difference is that for Gov sites the option on the active wetkit_bootstrap based theme for toggle_logo should be set to '1' which means use the default theme logo system. In order to not break any existing gov sites I have added a hook_update_n to wetkit_theme to set wetkit_bootstrap and related subthemes to this setting. If you are not a gov site and wish to use your own logic you will have to deselect this option again and enter your own paths.

sylus’s picture

StatusFileSize
new3.17 KB

I am just attaching the code that I have committed as a patch so the changes can be seen.

sylus’s picture

Status: Active » Fixed
rob drew’s picture

Thank you for this. Much appreciated!

joseph.olstad’s picture

Component: WetKit Theme » WetKit Bootstrap
Status: Fixed » Needs review
StatusFileSize
new6.19 KB

The previous commit only works for gcweb theme (the canada.ca theme)

this NEW patch makes it work for gcwu-fegc and gc-intranet (gcwu_fegc and gc_intranet) AKA the internet theme and intRAnet theme.

fixes to the panels tpls and page tpls as well as system/page.vars.php

see patch

This should be committed to wetkit_bootstrap

Thanks

sylus’s picture

There are still dpms in the patch this should be removed first before can be committed. Also I think we are only currently checking for gcweb + gc_intranet and not for gcwu-fegc. I thought the latter two templates were different based on wet-boew.github.io but definitely could be wrong so dont mind adding the extra logic.

Thx!

sylus’s picture

Status: Needs review » Needs work
joseph.olstad’s picture

Status: Needs work » Needs review
StatusFileSize
new6.04 KB

I removed the dpm() calls
The patch was tested, works good.

joseph.olstad’s picture

css class update for those using svg logos (we are using .gif so originally I missed this on the other patches)

for the gc-intranet theme page and panels tpl instead of the css class 'header-logo' the object tag should use 'gcwu-sig'

see latest patch.

joseph.olstad’s picture

gcwu_fegc theme default image needs this logic so it pulls the correct white maple leaf flag and GoC text on black background.

otherwise the uploaded image will be used (at your discretion)

so now I'd feel comfortable with RTBC on this. I've tested it quite a few times now in the two affected wxt_active themes.

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community
sylus’s picture

Status: Reviewed & tested by the community » Fixed

Looks good to me!

As a minor adjustment I had to remove the a href tags around the object / img as didn't see it added in the official template at:

http://wet-boew.github.io/themes-dist/theme-gcwu-fegc/index-en.html
http://wet-boew.github.io/themes-dist/theme-gc-intranet/index-en.html

Committed and attributed.

  • sylus committed 9610eee on 7.x-4.x
    Fixed WetKit Bootstrap for Issue #2530288: Logo settings in sub-theme...
  • sylus committed f773c17 on 7.x-4.x
    Fixed WetKit Theme for Issue #2530288 by sylus: Logo settings in sub-...
  • sylus committed f872756 on 7.x-4.x authored by joseph.olstad
    Fixed WetKit Bootstrap for Issue #2530288 by joseph.olstad, sylus: Logo...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.