Projet

Général

Profil

Actions

Anomalie #1615

fermé

Undefined constant GALETTE_TPL_SUBDIR in update mode

Ajouté par Johan Cwiklinski il y a plus de 2 ans. Mis à jour il y a presque 2 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
Core
Version cible:
Début:
11/01/2022
Echéance:
% réalisé:

100%

Temps estimé:
Version utilisée:

Description

When Galette switchs to update mode, some constants are not defined.

All was fixed on a recent demo update using the following patch:

diff --git a/galette/includes/dependencies.php b/galette/includes/dependencies.php
index 7c4aefd3..a7ce0e07 100644
--- a/galette/includes/dependencies.php
+++ b/galette/includes/dependencies.php
@@ -67,6 +67,28 @@ $container->set(
     DI\get('Slim\Views\Smarty')
 );
 $container->set('Slim\Views\Smarty', function (ContainerInterface $c) {
+
+    if (!defined('GALETTE_TPL_SUBDIR')) {
+        define(
+            'GALETTE_TPL_SUBDIR',
+            'templates/default/'
+        );
+    }
+
+    if (!defined('_CURRENT_THEME_PATH')) {
+        define(
+            '_CURRENT_THEME_PATH',
+            GALETTE_THEMES_PATH . 'default/'
+        );
+    }
+
+    if (!defined('GALETTE_THEME')) {
+        define(
+            'GALETTE_THEME',
+            'themes/default/'
+        );
+    }
+
     $view = new \Slim\Views\Smarty(
         rtrim(GALETTE_ROOT . GALETTE_TPL_SUBDIR, DIRECTORY_SEPARATOR),
         [


Fichiers

1615.patch (914 octets) 1615.patch Johan Cwiklinski, 14/01/2022 08:46
Actions

Formats disponibles : Atom PDF