Error.php mal géré

More
6 years 3 months ago - 6 years 3 months ago #49046 by nilegoff
Bonjour,

En V4, il semble que le fichier error.php ait un problème d’accès à la configuration du template car
Code:
if ($this->params->get('useresponsive','1'))
est en erreur ainsi que
Code:
if ($this->params->get('googleanalyticscode',''))

Merci par avance pour votre aide.
Nicolas
Last edit: 6 years 3 months ago by nilegoff.

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #49050 by ced1870
Replied by ced1870 on topic Error.php mal géré
salut
chez moi il n'y a pas de souci avec cela. J'ai vu d'autres soucis dans la page d'erreur, mais pas cela.
Qu'as-tu comme message d'erreur qui te permet d'identifier que ce code a un souci ?
CEd

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #49051 by nilegoff
Replied by nilegoff on topic Error.php mal géré
Bonjour,

J'ai comme message d'erreur:
Notice: Undefined property: Joomla\CMS\Document\ErrorDocument::$params in /home/XXXXX/XXXXX/www/templates/fpsmv2/error.php on line 46

Fatal error: Call to a member function get() on null in /home/XXXXX/XXXXX/www/templates/fpsmv2/error.php on line 46

Ligne 46 j'ai:
Code:
if ($this->params->get('useresponsive','1'))

Merci de votre avis.
Nicolas

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #49052 by ced1870
Replied by ced1870 on topic Error.php mal géré
normalement au début du fichier error.php tu dois avoir
Code:
$this->params = $app->getTemplate(true)->params;

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #49053 by nilegoff
Replied by nilegoff on topic Error.php mal géré
Désolé,

Je n'ai pas cela au de but du code.

Je viens de rajouter
Code:
$app = JFactory::getApplication(); $this->params = $app->getTemplate(true)->params;

Maintenant j'ai pour erreur

Notice: Undefined variable: doc in /home/XXXX/XXXX/www/templates/fpsmv2/error.php on line 126
Fatal error: Call to a member function getBuffer() on null in /home/XXXX/XXXX/www/templates/fpsmv2/error.php on line 126


Code ligne 126:
Code:
<?php echo $doc->getBuffer('modules', 'top1', array('style' => 'htmlck')); ?>

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #49054 by ced1870
Replied by ced1870 on topic Error.php mal géré
tu as
Code:
$doc = JFactory::getDocument();
?
c'est bizarre, tu utilises bien la 4.0.8 (maintenant 4.0.9) de template creator ?

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.226 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 544 guests and one member online