Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I uploaded a custom logo through the Bartik settings UI and it shows on the live site, but not in preview. I'm using Seven for admin. It appears that code in core/themes/bartik/color/color.inc
(lines 9-10) has no effect.
// Put the logo path into JavaScript for the live preview.
$js_attached['#attached']['drupalSettings']['color']['logo'] = theme_get_setting('logo.url', 'bartik');
drupal_render($js_attached);
When you look at the source it seems the code doesn't add to drupalSettings.colorl.logo
at /admin/appearance/settings/bartik
Comment | File | Size | Author |
---|---|---|---|
#1 | 2396983-1-preview-custom-logo-broken.patch | 523 bytes | corbacho |
Comments
Comment #1
corbacho CreditAttribution: corbacho commentedGood catch mermentau!
I can replicate this bug. After uploading a custom logo, the Preview area doesn't show the custom logo, it shows always the druplicon, the Bartik default logo. Patch attached
Replacing
drupal_render
withdrupal_process_attached
Comment #2
corbacho CreditAttribution: corbacho commented.
Comment #3
balagan CreditAttribution: balagan commentedPatch is working fine. I had some hard time working on its duplicate issue, I think the https://www.drupal.org/theme-guide/8/assets page should be updated with information regarding drupal_process_attached()
Comment #4
alexpottThemes can't have tests :( This issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed a24a858 and pushed to 8.0.x. Thanks!
Comment #6
balagan CreditAttribution: balagan commentedI have opened an issue for the theme system: https://www.drupal.org/node/2406465