Jeedom 4.4 : Uncaught TypeError: $(...).datetimepicker is not a function

Bonjour,

Ca y est j’ai fait ma mise à jour 4.4. Après beaucoup de boulot il me reste encore quelques petits ajustements nécessaires.

Version : 4.4.2
Source : default
Branche : V4-stable
Système : Atlas

L’un d’eux c’est d’identifier qui me génère cette erreur. Il semble que quelque chose fasse appel à jquery datetimepicker , probablement un plugin ou widget, je doute que ca soit core.

J’ai une stacktrace, mais elle ne m’aide pas:

VM1595:119 Uncaught TypeError: $(...).datetimepicker is not a function
    at <anonymous>:119:75
    at domUtils.loadScript (getResource.php?file=core/dom/dom.utils.js&md5=2c31cf538c4a6ecd19aed3daa3a4a5de&lang=fr_FR:358:20)
    at domUtils.loadScript (getResource.php?file=core/dom/dom.utils.js&md5=2c31cf538c4a6ecd19aed3daa3a4a5de&lang=fr_FR:359:14)

Comment puis-je (efficacement, si possible, sans tout desactiver un à un) identifier le coupable ?
Merci !

mmm rechercher ça avec un grep dans le dossier /var/www/html/ ?

je suis encore en 4.3 mais :

3 « J'aime »

Salut,

Il faut viser les plugins qui utilisent un champ pour sélectionner une date et/ou un horaire.

1 « J'aime »

C’est le plugin naEnergie !

plugins/naEnergie/core/template/dashboard/custom.eqTherm.html.old:$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker();
plugins/naEnergie/core/template/dashboard/custom.eqTherm.html.old:    $('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker('setOptions',  {
plugins/naEnergie/core/template/dashboard/custom.eqTherm.html.old:  	$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker('show');
plugins/naEnergie/core/template/dashboard/custom.eqTherm.html.old:  	$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker({
plugins/naEnergie/core/template/dashboard/custom.eqTherm.html.old:  	$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker();
plugins/naEnergie/core/template/dashboard/custom.eqTherm.html.old:							$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker({
plugins/naEnergie/core/template/dashboard/custom.eqHome.html: 		$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker();
plugins/naEnergie/core/template/dashboard/custom.eqHome.html:        	$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker({
plugins/naEnergie/core/template/dashboard/default.eqTherm.html:  	//$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker();
plugins/naEnergie/core/template/dashboard/default.eqTherm.html:	$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker({
plugins/naEnergie/core/template/dashboard/default.eqHome.html: 		$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker();
plugins/naEnergie/core/template/dashboard/default.eqHome.html:        	$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker({
plugins/naEnergie/core/template/dashboard/custom.eqHome.html.old:$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker();
plugins/naEnergie/core/template/dashboard/custom.eqHome.html.old:    $('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker('setOptions',  {
plugins/naEnergie/core/template/dashboard/custom.eqHome.html.old:  	$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker('show');
plugins/naEnergie/core/template/dashboard/custom.eqHome.html.old:  	$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker({
plugins/naEnergie/core/template/dashboard/custom.eqHome.html.old:  	$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker();
plugins/naEnergie/core/template/dashboard/custom.eqHome.html.old:							$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker({
plugins/naEnergie/core/template/dashboard/custom.eqTherm.html:  	//$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker();
plugins/naEnergie/core/template/dashboard/custom.eqTherm.html:	$('.eqLogic[data-eqLogic_uid=#uid#] .natimepicker').datetimepicker({

je me permets de pinger @limad44: si jamais tu peux me confirmer que je ne me suis pas planté quelque part, j’ai certes des occurences dans mes fichiers custom, ca, c’est à moi de régler le problème, mais je les vois aussi dans les fichiers de référence.

malheureusement c’est ce que j’avais fait avant de poster un message ici, mais j’en ai pas. Et le suspect en définit, mais je ne les affiche pas, du coup je n’ai pas pensé à cette possibilité.

Effectivement c’est naEnergie, le dev est au courant :

1 « J'aime »

Merci ! (à tout le monde !)

Bonjour
Effectivement c’est naEnergie…
Je regarde pour une solution dès que possible.

1 « J'aime »

Tu peux remplacer par ça:

Je l’ai utilisé pour SuiviConso

2 « J'aime »

Maj en ligne.
@guipom de mémoire tu sur des tuiles custom, n’oublie pas que c’est à toi de jouer mais il est probable je corrige deux trois trucs en plus.

1 « J'aime »

Malheureusement en l’état c’est pas adapté aux besoins du widget.
Je dois lancer depuis un texte, avec date et heure + boutton OK.
Il faut que je prenne le temps pour trouver ça.

1 « J'aime »

Tout à fait oui, c’est ce que je disais plus haut, sur la partie custom j’en assure la complète responsabilité :grin:

Je n’ai plus d’erreur (en tuile par défaut), merci beaucoup !

1 « J'aime »

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.