[Skip to main content](#vessel-content)

#   Erreur avec le composant Joomlageek et cron task

##

- **[thefbi](/forum/user/65220-thefbi "View thefbi's Profile")**
- [![thefbi's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/65220-thefbi "View thefbi's Profile") Topic Author
- [ Offline](/forum/user/65220-thefbi)

Less More

- Posts: 370
- Thank you received: 28
-
-
- [](https://web-ressources.ch)
-

3 years 8 months ago [\#348757](#348757) by [thefbi](/forum/user/65220-thefbi "View thefbi's Profile")  *[Erreur avec le composant Joomlageek et cron task](/forum/5-support-en-francais-french-support-/905791-erreur-avec-le-composant-joomlageek-et-cron-task#348757 "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 &quot;getting document in Application Console in Joomla 4&quot;.  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&#95;hikashop/helpers/helper.php  #2. Find a code block:  #3. Replace it to:  #4. Still in this file, continue to find a code block:  #5. Replace it to:  #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-&gt;get('load&#95;js', 1) || $admin; $css = $configClass-&gt;get('load&#95;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é...")* was created by *[thefbi](/forum/user/65220-thefbi "View thefbi's Profile")*

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: Code:

$lang = JFactory::getLanguage(); $doc = JFactory::getDocument();

\#3. Replace it to: Code:

if(!JFactory::getApplication()-&gt;isClient('cli')) { $doc = JFactory::getDocument(); }

\#4. Still in this file, continue to find a code block: Code:

$js = $configClass-&gt;get('load_js', 1) &#124;&#124; hikashop_isClient('administrator'); $css = $configClass-&gt;get('load_css',1) &#124;&#124; hikashop_isClient('administrator');

\#5. Replace it to: Code:

$js = $configClass-&gt;get('load_js', 1) &#124;&#124; hikashop_isClient('administrator'); $css = $configClass-&gt;get('load_css',1) &#124;&#124; hikashop_isClient('administrator'); if(JFactory::getApplication()-&gt;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-&gt;get('load_js', 1) &#124;&#124; $admin;
$css = $configClass-&gt;get('load_css',1) &#124;&#124;$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é...

---

“Si tu ne travaille pas pour tes rêves, quelqu'un t'embauchera pour travailler pour les siens" - Steeve Jobs
"La sagesse, c’est d’avoir des rêves suffisamment grands pour ne pas les perdre de vue quand on les poursuit." - Oscar Wilde

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vOTA1NzkxLWVycmV1ci1hdmVjLWxlLWNvbXBvc2FudC1qb29tbGFnZWVrLWV0LWNyb24tdGFzaz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14267
-
-

3 years 8 months ago -  3 years 8 months ago [\#348759](#348759) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Erreur avec le composant Joomlageek et cron task](/forum/5-support-en-francais-french-support-/905791-erreur-avec-le-composant-joomlageek-et-cron-task#348759 "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 &quot;getting document in Application Console in Joomla 4&quot;.  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&#95;hikashop/helpers/helper.php  #2. Find a code block:  #3. Replace it to:  #4. Still in this file, continue to find a code block:  #5. Replace it to:  #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-&gt;get('load&#95;js', 1) || $admin; $css = $configClass-&gt;get('load&#95;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é...")*

Bonjour,

Merci pour le retour.
Nous avons fait des modifications en ce sens mais pas les modifications proposées, car elles créeraient des problèmes.
En effet, la proposition #2/#3 va créer des erreurs avec $lang manquant et la proposition #5/#6 va faire planter HikaShop sous Joomla 2.5 (pour les personnes qui voudrait mettre à jour depuis 2.5 vers 3 ou 4, il est préférable que la dernière version d'HikaShop soit toujours compatible, au moins un minimum).
Après avoir testé les modifications de notre coté, nous les avons ajouté dans le paquet disponible sur notre site.
Donc téléchargez à nouveau le paquet d'installation de la 4.7.1 et installez-le sur votre site et cela devrait toujours fonctionner normalement.

Last edit: 3 years 8 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vOTA1NzkxLWVycmV1ci1hdmVjLWxlLWNvbXBvc2FudC1qb29tbGFnZWVrLWV0LWNyb24tdGFzaz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[thefbi](/forum/user/65220-thefbi "View thefbi's Profile")**
- [![thefbi's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/65220-thefbi "View thefbi's Profile") Topic Author
- [ Offline](/forum/user/65220-thefbi)

Less More

- Posts: 370
- Thank you received: 28
-
-
- [](https://web-ressources.ch)
-

3 years 8 months ago [\#348834](#348834) by [thefbi](/forum/user/65220-thefbi "View thefbi's Profile")  Replied by *[thefbi](/forum/user/65220-thefbi "View thefbi's Profile")* on topic *[Erreur avec le composant Joomlageek et cron task](/forum/5-support-en-francais-french-support-/905791-erreur-avec-le-composant-joomlageek-et-cron-task#348834 "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 &quot;getting document in Application Console in Joomla 4&quot;.  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&#95;hikashop/helpers/helper.php  #2. Find a code block:  #3. Replace it to:  #4. Still in this file, continue to find a code block:  #5. Replace it to:  #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-&gt;get('load&#95;js', 1) || $admin; $css = $configClass-&gt;get('load&#95;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é...")*

Bonjour,

Merci, je vous confirmer que tout fonctionne avec la dernière version installée.

---

“Si tu ne travaille pas pour tes rêves, quelqu'un t'embauchera pour travailler pour les siens" - Steeve Jobs
"La sagesse, c’est d’avoir des rêves suffisamment grands pour ne pas les perdre de vue quand on les poursuit." - Oscar Wilde

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vOTA1NzkxLWVycmV1ci1hdmVjLWxlLWNvbXBvc2FudC1qb29tbGFnZWVrLWV0LWNyb24tdGFzaz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.164 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
