2023-03-11
23:31 Fixed ticket [2271388422]: brindille Mauvais chemin d'accès pour custom_css plus 4 other changes artifact: 1f279c3f23 user: bohwaz
23:29
Fix [227138842234710930f8c8d9bb9b7f9176ef3a0f] wrong URL prefix used check-in: 3d2cc53ada user: bohwaz tags: dev
2023-03-10
14:27 Ticket [2271388422] brindille Mauvais chemin d'accès pour custom_css status still Open with 3 other changes artifact: 6de3c050e3 user: alinaar
2023-03-09
17:34 Open ticket [2271388422]. artifact: bc1fe89f05 user: alinaar
2023-03-08
20:59 Fixed ticket [2271388422]. artifact: 14b2e5d71c user: bohwaz
20:58
Fix [2271388422] wrong path when handling "./" in local urls check-in: 391194375f user: bohwaz tags: dev
12:56 New ticket [2271388422] brindille Mauvais chemin d'accès pour custom_css. artifact: b95adda590 user: alinaar

Ticket Hash: 227138842234710930f8c8d9bb9b7f9176ef3a0f
Title: [brindille] Mauvais chemin d'accès pour custom_css
Status: Fixed Type: Bug
Severity: Important Priority: Immediate
Subsystem: Resolution: Fixed
Last Modified: 2023-03-11 23:31:11
Version Found In: 1.3 alpha1
User Comments:

alinaar added on 2023-03-08 11:56:36:

Bonjour,

Depuis la page index.html d'un module, l'exemple de la documentation ne fonctionne pas :

{{:admin_header title="My title" custom_css="./style.css"}}

Renvoi :

<link rel="stylesheet" type="text/css" href="https:/style.css?4fc1890833" media="all" />

Il manque toute la partie mon-domaine.tld/m/module_name/.

Si on enlève le prefixe ./ le lien cherche dans les CSS défauts de paheko (ce qui semble normal).

<link rel="stylesheet" type="text/css" href="https://mon-domaine.tld/admin/static/styles/test.css?4fc1890833" media="all" />

bohwaz added on 2023-03-08 19:59:12:

Merci corrigé !


alinaar added on 2023-03-09 16:34:47:

Merci corrigé !

Eh non, l'url générée contient admin en trop : https://mon-asso.tld/admin/m/module_name/style.css?25f3473c58.
Qui retourne une 404.

Alors que la bonne adresse de la feuille de style (et des fichiers du module) est : https://mon-asso.tld/m/module_name/style.css?25f3473c58


alinaar added on 2023-03-10 13:27:06:

Proposition de quick-fix :

// Garradin/Utils.php

static public function getSelfURL($qs = true)
{
[...]
  if (strpos($uri, '/m/') === 0) {
    return WWW_URL . ltrim($uri, '/');
  }

  return ADMIN_URL . ltrim($uri, '/');
}

bohwaz added on 2023-03-11 22:31:11: