Created on 9 April 2024, 8 months ago
Updated 22 July 2024, 4 months ago

Problem/Motivation

Gli svg non vengono caricati correttamente quando drupal รจ installato in una sub directory (non web) che non coincide con la document root.
Il problema sembrerebbe risiedere in icon.html.twig, riga 107
{% set _icon_path = "/" ~ active_theme_path() ~ "/dist/svg/" ~ _library ~ "#" ~ _name %}
active_theme_path() non considera la sub_folder, inoltre in questo twig non sembra essere disponibile il base_path

Steps

Installare drupal utilizzando composer create-project drupal/legacy-project sub-directory
Installare boostrap italia con il metodo A. Bootstrap-italia vanilla

๐Ÿ› Bug report
Status

Fixed

Version

2.7

Component

Documentation

Created by

๐Ÿ‡ฎ๐Ÿ‡นItaly marcob77

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @marcob77
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly marcob77
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly marcob77

    Per aggirare il problema รจ possibile nel sottotema ridefinire icon.html.twig, riga 107
    {% set _icon_path = "/your_sub_folder/" ~ active_theme_path() ~ "/dist/svg/" ~ _library ~ "#" ~ _name %}
    (in components/components2/icon) e ricordarsi di modificare l'info.yml del child tema inserendo nei components

    bi-bcl:
    - components/components-2

  • Status changed to Needs review 6 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly arturopanetta Grotteria (RC)

    The theme has a workaround for using icons in this case. Go to subtheme settings -> "Libraries" -> "CDN Settings" -> "Icons from CDN"; set the path until you reach sprites.svg.

    Obviously remember not to bring this setting into production if it is not needed.

  • Status changed to Fixed 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly arturopanetta Grotteria (RC)
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024