Bonjour,
Je vous écrit ici à la demande de l'équipe de Joomlageek, car il y a un petit souci avec l'execution des tâches cron depuis leur plugin.
Apparemment il y a un problème avec "getting document in Application Console in Joomla 4".
Je joins la conversation avec leur support :
DEBUT CONVERSATION
Hello Frederic,
The ConsoleApplication in Joomla 4 does not support method getDocument,
but the helper class of Hikashop does not check the Application is running before load document, and this cause this error.
You can follow steps below to temporarily resolve this issue:
#1. Open the file:
administrator/components/com_hikashop/helpers/helper.php
#2. Find a code block:
$lang = JFactory::getLanguage();
$doc = JFactory::getDocument();
#3. Replace it to:
if(!JFactory::getApplication()->isClient('cli')) {
$doc = JFactory::getDocument();
}
#4. Still in this file, continue to find a code block:
$js = $configClass->get('load_js', 1) || hikashop_isClient('administrator');
$css = $configClass->get('load_css',1) || hikashop_isClient('administrator');
#5. Replace it to:
$js = $configClass->get('load_js', 1) || hikashop_isClient('administrator');
$css = $configClass->get('load_css',1) || hikashop_isClient('administrator');
if(JFactory::getApplication()->isClient('cli')) {
$js = 0;
$css = 0;
}
#6. Save changes and test again if it works.
Bon j'ai eu un souci pour trouver un code et ils m'ont répondu :
In your Hikashop version, the #4 block is:
$js = $configClass->get('load_js', 1) || $admin;
$css = $configClass->get('load_css',1) ||$admin;
PS: If this solution works, please report Hikashop team to apply this fix to the next release of Hikashop component.
FIN CONVERSATION
Donc ils ont corrigé le code sur mon site, mais du coup, il faudrait que vous le mettiez à jour de votre côté...