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?
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | wetkit_bootstrap4x_Logo_settings_in_sub_theme_intranet_gcwu-2530288-10.patch | 6.37 KB | joseph.olstad |
| #2 | logo_settings_in-2530288-2.patch | 3.17 KB | sylus |
Comments
Comment #1
sylus commentedThis 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:
Instead of:
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.
Comment #2
sylus commentedI am just attaching the code that I have committed as a patch so the changes can be seen.
Comment #3
sylus commentedComment #4
rob drew commentedThank you for this. Much appreciated!
Comment #5
joseph.olstadThe 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
Comment #6
sylus commentedThere 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!
Comment #7
sylus commentedComment #8
joseph.olstadI removed the dpm() calls
The patch was tested, works good.
Comment #9
joseph.olstadcss 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.
Comment #10
joseph.olstadgcwu_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.
Comment #11
joseph.olstadComment #12
sylus commentedLooks 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.