Hi

The linked logo part of the theme always seem to be empty for me what ever I do.

In preprocess page in base theme the $logo variable is also always empty so the logo_img variables is never populated.

$variables['logo_img'] = '';
if (!empty($variables['logo'])) {
$elements = array(
'#theme' => 'image',
'#attributes' => array(
'src' => $variables['logo'],
'alt' => strip_tags($site_name) . ' ' . t('logo'),
'title' => strip_tags($site_name) . ' ' . t('Home'),
'class' => array('logo'),
)
);

$variables['logo_img'] = $elements;
}

CommentFileSizeAuthor
#3 fix_logo_variable-2638000-3.patch723 bytesabu-zakham
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Strutsagget created an issue. See original summary.

Strutsagget’s picture

Seems like drupal want us to use the new block instead.

Maybe we can find some inspiration from here https://www.drupal.org/node/2472127

abu-zakham’s picture

Status: Active » Needs review
FileSize
723 bytes

Hello, this patch fixed issue.
Thanks

  • samuel.mortenson committed 0a10d20 on 8.x-5.x
    Issue #2638000 by Abdulla Abu-Zakham, Strutsagget: linked_logo always...
samuel.mortenson’s picture

Status: Needs review » Fixed

Thanks for the issue/patch, I committed something similar to #3 but changed the variable and render array to match the code in \Drupal\system\Plugin\Block\SystemBrandingBlock.

Status: Fixed » Closed (fixed)

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