lowdit / frago

Génération de rapports de synthèse pour le suivi et l’amélioration de l’accessibilité (audits et recommandations)
https://lowdit.github.io/frago/
MIT License
16 stars 4 forks source link

Plantage après mise à jour du dernier thème #14

Closed firewalkwizme closed 9 months ago

firewalkwizme commented 1 year ago

J'ai récupéré la dernière version du thème hier (12/07/23) et fait un annule et remplace dans mon site du répertoire themes.

Au lancement du serveur Hugo, j'ai ces messages d'erreur :

Start building sites … 
hugo v0.97.3-078053a43d746a26aa3d48cf1ec7122ae78a9bb4 windows/amd64 BuildDate=2022-04-18T17:22:19Z VendorInfo=gohugoio
ERROR 2023/07/13 17:26:39 Failed to get CSV resource "/false": open C:\Users\ygoupil\Hugo\sites\Test\false: Le fichier spécifié est introuvable.
If you feel that this should not be logged as an ERROR, you can ignore it by adding this to your site config:
ignoreErrors = ["error-remote-getcsv"]
WARN 2023/07/13 17:26:39 Fichier d’audit manquant dans map[auditfile-all-name:<nil> auditfile-all-path:<nil> auditfile-context:<nil> auditfile-name:<nil> auditfile-path:/false datafilename:<nil> ext:csv path:static/amendes/accessibility/ pathdata:static/amendes/accessibility pathproject:static/amendes project:amendes rootpath:static type:accessibility]
WARN 2023/07/13 17:26:39 Il n'y a pas d’audit correspond au chemin de fichier audits\amendes\accessibility.md
ERROR 2023/07/13 17:26:40 render of "page" failed: execute of template failed: template: audits/single.html:66:23: executing "main" at <partialCached "templates/projects.html" $context $context>: error calling partialCached: execute of template failed: template: partials/templates/projects.html:19:43: executing "partials/templates/projects.html" at <partialCached "render/lastfile.html" (dict "context" . "project" $project "type" "greenit" "datafilename" .Params.datafilename) $project "greenit" .Params.datafilename>: error calling partialCached: "C:\Users\ygoupil\Hugo\sites\Test\themes\frago\layouts\partials\render\lastfile.html:47:39": execute of template failed: template: partials/render/lastfile.html:47:39: executing "partials/render/lastfile.html" at <readDir ($datalastfile.Get "pathdata")>: error calling readDir: failed to read directory "content/organism/greenit": open C:\Users\ygoupil\Hugo\sites\Test\content\organism\greenit: Le chemin d’accès spécifié est introuvable.
ERROR 2023/07/13 17:26:40 render of "page" failed: execute of template failed: template: audits/single.html:66:23: executing "main" at <partialCached "templates/projects.html" $context $context>: error calling partialCached: execute of template failed: template: partials/templates/projects.html:19:43: executing "partials/templates/projects.html" at <partialCached "render/lastfile.html" (dict "context" . "project" $project "type" "greenit" "datafilename" .Params.datafilename) $project "greenit" .Params.datafilename>: error calling partialCached: "C:\Users\ygoupil\Hugo\sites\Test\themes\frago\layouts\partials\render\lastfile.html:47:39": execute of template failed: template: partials/render/lastfile.html:47:39: executing "partials/render/lastfile.html" at <readDir ($datalastfile.Get "pathdata")>: error calling readDir: failed to read directory "content/organism/greenit": open C:\Users\ygoupil\Hugo\sites\Test\content\organism\greenit: Le chemin d’accès spécifié est introuvable.
ERROR 2023/07/13 17:26:40 render of "page" failed: execute of template failed: template: audits/single.html:66:23: executing "main" at <partialCached "templates/projects.html" $context $context>: error calling partialCached: execute of template failed: template: partials/templates/projects.html:19:43: executing "partials/templates/projects.html" at <partialCached "render/lastfile.html" (dict "context" . "project" $project "type" "greenit" "datafilename" .Params.datafilename) $project "greenit" .Params.datafilename>: error calling partialCached: "C:\Users\ygoupil\Hugo\sites\Test\themes\frago\layouts\partials\render\lastfile.html:47:39": execute of template failed: template: partials/render/lastfile.html:47:39: executing "partials/render/lastfile.html" at <readDir ($datalastfile.Get "pathdata")>: error calling readDir: failed to read directory "content/organism/greenit": open C:\Users\ygoupil\Hugo\sites\Test\content\organism\greenit: Le chemin d’accès spécifié est introuvable.
ERROR 2023/07/13 17:26:40 render of "home" failed: execute of template failed: template: index.html:26:25: executing "main" at <partialCached "templates/organism-list.html" . "organism">: error calling partialCached: execute of template failed: template: partials/templates/organism-list.html:95:18: executing "partials/templates/organism-list.html" at <partialCached "components/scores/greenit-small" (dict "context" . "project" "") "">: error calling partialCached: execute of template failed: template: partials/components/scores/greenit-small.html:4:28: executing "partials/components/scores/greenit-small.html" at <partialCached "render/lastfile.html" (dict "context" .context "project" $project "type" "greenit") $project "greenit">: error calling partialCached: "C:\Users\ygoupil\Hugo\sites\Test\themes\frago\layouts\partials\render\lastfile.html:47:39": execute of template failed: template: partials/render/lastfile.html:47:39: executing "partials/render/lastfile.html" at <readDir ($datalastfile.Get "pathdata")>: error calling readDir: failed to read directory "content/organism/greenit": open C:\Users\ygoupil\Hugo\sites\Test\content\organism\greenit: Le chemin d’accès spécifié est introuvable.
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: audits/single.html:66:23: executing "main" at <partialCached "templates/projects.html" $context $context>: error calling partialCached: execute of template failed: template: partials/templates/projects.html:19:43: executing "partials/templates/projects.html" at <partialCached "render/lastfile.html" (dict "context" . "project" $project "type" "greenit" "datafilename" .Params.datafilename) $project "greenit" .Params.datafilename>: error calling partialCached: "C:\Users\ygoupil\Hugo\sites\Test\themes\frago\layouts\partials\render\lastfile.html:47:39": execute of template failed: template: partials/render/lastfile.html:47:39: executing "partials/render/lastfile.html" at <readDir ($datalastfile.Get "pathdata")>: error calling readDir: failed to read directory "content/organism/greenit": open C:\Users\ygoupil\Hugo\sites\Test\content\organism\greenit: Le chemin d’accès spécifié est introuvable.
bertrandkeller commented 1 year ago

Hello,

Il y avait possiblement un test manquant.

Si je teste si "content/organism/greenit" existe est-ce que l'existence de "content/organism/" doit être testé ?

Mais, j'ai ajouté du contenu au dépôt par erreur. Et il y a un micmac dans Hugo pour tester les contenus du thème et du dépôt de contenu.

J'ai reproduis l'erreur, cela semble bon.

firewalkwizme commented 1 year ago

Tu me préviens quand tu re-déploies le thème stp ? Merci.

bertrandkeller commented 1 year ago

J'avais déployé une correction jeudi soir… dis moi.

firewalkwizme commented 1 year ago

OK, je n'ai plus les messages d'erreur au lancement.

mloyat commented 10 months ago

Salut, j'ai fait une init hier et j'ai eu la même erreur. J'ai spécifié une ancienne version pour pouvoir faire fonctionner mon installation.

bertrandkeller commented 10 months ago

J'ai fait un gros boulot de nettoyage des erreur, mais j'ai pas mis à jour le code de master.

Il y avait une erreur en raison d'une condition déclarée avec cond, Hugo interprète chacune des possibilités de condition que la condition soit vérifiée ou non.

C'est assez difficile à débugguer.

En gros, il déclare des divisions pas zéro, ou des fichiers inexistants, alors qu'on lui demande pas de les charger. J'ai remplacé par l'éternel if.

bertrandkeller commented 10 months ago

Maintenant ça doit être bon. Sans ajouter :

ignoreErrors = ["error-remote-getcsv"] dans le config.toml.

mloyat commented 10 months ago

Merci. J'ai tenté une mise à jour et ça me sort une erreur :

ERROR render of "section" failed: "/home/marc/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/lowdit/frago@v1.16.1/layouts/audits/list.html:146:36": execute of template failed: template: audits/list.html:146:36: executing "main" at <partialCached "templates/dashboard.html" $context $context>: error calling partialCached: "/home/marc/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/lowdit/frago@v1.16.1/layouts/partials/templates/dashboard.html:2:17": execute of template failed: template: partials/templates/dashboard.html:2:17: executing "partials/templates/dashboard.html" at <partialCached "templates/projects-list.html" . .>: error calling partialCached: "/home/marc/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/lowdit/frago@v1.16.1/layouts/partials/templates/projects-list.html:4:35": execute of template failed: template: partials/templates/projects-list.html:4:35: executing "partials/templates/projects-list.html" at <partialCached "render/aggregate-scores.html" (dict "pages" ($.Store.Get "rangepages")) ($.Store.Get "rangepages")>: error calling partialCached: "/home/marc/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/lowdit/frago@v1.16.1/layouts/partials/render/aggregate-scores.html:174:34": execute of template failed: template: partials/render/aggregate-scores.html:174:34: executing "partials/render/aggregate-scores.html" at <merge (merge ($data.Get (printf "average-%!s(MISSING)-conforme" $type)) ($data.Get (printf "average-%!s(MISSING)-nonconforme" $type))) ($data.Get (printf "average-%!s(MISSING)-nonapplicable" $type))>: error calling merge: destination must be a map, got <nil>

hugo v0.120.3

bertrandkeller commented 10 months ago

Erreur de merge sur une MAP vide. Tu as un projet qui contient des audits qui ne contiennent ou pas de non applicable, ou pas de conforme, ou pas de conforme.

mloyat commented 10 months ago

Mmm... j'ai démarré avec un fichier à 4 lignes :

Thématiques,Critères,Transverse (toutes les pages)
8,1,c
8,2,c
10,7,nc
bertrandkeller commented 10 months ago

C'est ça pas de non applicable. Je dois corriger le truc

mloyat commented 10 months ago

Après c'est un fonctionnement particulier. Je teste une méthode d'accompagnement en phase de développement en pointant les non-conformités majeures et proposant des recommandations associées. L'audit va se remplir petit à petit. On verra ce que ça donne.

bertrandkeller commented 10 months ago

J'ai poussé une modification