Created on 9 April 2024, 3 months ago
Updated 30 May 2024, 29 days 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

Needs review

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 29 days 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.

Production build 0.69.0 2024