Problem/Motivation

Se si installa Drupal in una subfolder, ad esempio tramite composer che crea la folder /web, il percorso delle icone non viene letto correttamente.

Steps to reproduce

Installare Drupal in una subfolder, installare il tema, attivarlo, le icone non vengono lette nel percorso.

Proposed resolution

Modificare il file icon.twig in attesa di patch:

<use xlink:href="{{ active_theme_path() }}/assets/icons/{{ library }}#{{ name }}"></use> 

A:

<use xlink:href="./{{ active_theme_path() }}/assets/icons/{{ library }}#{{ name }}"></use>

Comments

Studiolo created an issue. See original summary.

luca pagani’s picture

Issue summary: View changes
andregp’s picture

Assigned: Unassigned » andregp

I'll work on this.

andregp’s picture

Assigned: andregp » Unassigned
Status: Active » Needs review
Issue tags: +Novice
StatusFileSize
new495 bytes

Done.

arturopanetta’s picture

Status: Needs review » Needs work
arturopanetta’s picture

Status: Needs work » Needs review
ilgnerfagundes’s picture

Status: Needs review » Needs work
StatusFileSize
new45.66 KB

The patch does not apply

ilgnerfagundes’s picture

Status: Needs work » Needs review
StatusFileSize
new513 bytes

Patch update

andregp’s picture

@ilgnerfagundes you replaced a line with /assets/svg/ by /assets/icons/. Was it on purpose?

ilgnerfagundes’s picture

Status: Needs review » Needs work

Hi, I think I made the change wrong, patch #4 doesn't run and I think it's out of date because it hears a change from assets/icons/ to assets/svg/, but I got the change that was in patch # 4 and I just copied it for the patch to run, and now looking at it better I think I should change it to assets/svg/ in the patch too

arturopanetta’s picture

Thanks to @ilgnerfagundes for the patch and @andregp for reporting the wrong path. <3

I tested @ilgnerfagundes' patch with the correct path, but it only works on the home page, it doesn't work on the inside pages.

I think that Drupal installed in subfolder, as is the case with this issue, is not very used and solving this problem is not so immediate.

andregp’s picture

@arturopanetta thanks, but the credits for reporting the wrong path should go for @Studiolo. =)

arturopanetta’s picture

arturopanetta’s picture

Status: Needs work » Fixed

Version 2 solves this problem with a workaround. Go to theme settings -> Libraries -> CDN Settings and fill the "Icons from CDN" field with the correct path.

arturopanetta’s picture

Status: Fixed » Closed (fixed)