I fixed this error by replacing VARTHEME_SUBTHEME preprocess_page with vartheme preprocess_page,

/**
 * Implements hook_preprocess_page().
 */
function VARTHEME_SUBTHEME_preprocess_page(&$variables) {
  $variables['logo_print'] = drupal_get_path('theme','VARTHEME_SUBTHEME') . '/logo-print.png';
}
/**
 * Implements hook_preprocess_page().
 */
function vartheme_preprocess_page(&$variables) {
  $variables['logo_print'] = \Drupal::request()->getBaseUrl() . '/' . drupal_get_path('theme', 'vartheme') . '/logo-print.png';
}

Regards.

Comments

abu-zakham created an issue. See original summary.

rajab natshah’s picture

Title: Vartheme subtheme generate logo print wrong URL » Fixed the print logo for VARTHEM_SUBTHEME which had a wrong URL, as it was fixed in vartheme
Issue tags: +varbase-8.4.14

rajab natshah’s picture

Thank you ... Committed :)

rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Status: Fixed » Closed (fixed)