If the Bartik color preview page is visited using a language prefix in the path (e.g. /fa/admin/appearance/settings/bartik), the site logo isn't loaded in the preview section, because the logo path is hard-coded in the html as a relative path, which fails with the extra language prefix.

There is some javascript in the related color/preview.js in Bartik to replace the correct path for the logo, but it doesn't seem to work anymore. I don't have much knowledge in this part, but I suspect that #2160603: Remove drupal_add_js() from Bartik broke it, becuase the required setting isn't loaded into the page anymore.

CommentFileSizeAuthor
#1 bartik-preview-screen.png36.26 KBherom

Comments

herom’s picture

StatusFileSize
new36.26 KB

Here is a screenshot of the broken logo, and hard-coded path.

gábor hojtsy’s picture

Title: Broken site logo in Bartik color preview, if visited by path with language prefix » Broken site logo in Bartik color preview, if visited on path with language prefix
Issue tags: +D8MI, +language-base, +Novice, +JavaScript

It should still be possible to add JS settings to the page with #attached. Therefore making novice.

balagan’s picture

Assigned: Unassigned » balagan
balagan’s picture

drupalSettings.color.logo is undefined on the page, though in the color.inc it is set with #attached.

balagan’s picture

Status: Active » Closed (duplicate)

This is a duplicate issue for the following: https://www.drupal.org/node/2396983
The patch in comment #1 solves this.

balagan’s picture

Assigned: balagan » Unassigned
gábor hojtsy’s picture

#2396983: Header Logo with Bartik won't change in settings preview is resolved and committed so this should be resolved :) Yay!