Actions
Anomalie #32181
ferméREVIEW - Recherche avancée : Recherche par critère d'annotation erreur "Unexpected token '<' " " ... is not valid JSON" si les warning sont activés au niveau de PHP
Début:
19/11/2024
Echéance:
Description
Bonjour,
Notre client nous remonte un message d'erreur JSON lors d'une recherche sur le critère annotation.
Un contournent a été trouvé dans le fichier /var/www/html/MaarchCourrier/src/app/search/controllers/SearchController.php, à la ligne 828

Nous avons remplacé
if ($note['user_id'] == $GLOBALS['id']) {
par
if ($note['user_id'] ?? '' == $GLOBALS['id']) {
Pouvez-vous analyser et nous aider à corriger l'erreur de façon pérenne ?
version Maarch Courrier 2301.4.0 et MaarchCapture 2.0
En tant qu'utilisateur je fais une recherche avancée avec comme critère "annotation"
J'ai une erreur Unexpected token '<' " " ... is not valid JSON qui pop
Dans la console :
Proposition de correctif par le client dans le fichier : /var/www/html/MaarchCourrier/src/app/search/controllers/SearchController.php
Remplacé
if ($note['user_id'] == $GLOBALS['id']) {
par
if ($note['user_id'] ?? '' == $GLOBALS['id']) {
Non reproduit sur nos instances (pas de warning actif)
Cible : 2301 et 24
Fichiers
Actions
#2
Mis à jour par Cynthia APURA il y a environ 2 mois
- Statut changé de A qualifier à R&D - A étudier
- Assigné à
Cynthia APURAsupprimé - Priorité changé de 2-Sérieux à 1-Majeur
Actions
#3
Mis à jour par Cynthia APURA il y a environ 2 mois
- Fichier clipboard-202501221605-s5fyg.png clipboard-202501221605-s5fyg.png ajouté
- Description mis à jour (diff)
Actions
#4
Mis à jour par Cynthia APURA il y a environ 2 mois
- Sujet changé de REVIEW - Recherche avancée : Recherche par critère d'annotation erreur "Unexpected token '<' " " is not valid JSON" à REVIEW - Recherche avancée : Recherche par critère d'annotation erreur "Unexpected token '<' " " ... is not valid JSON"
Actions
#6
Mis à jour par Emmanuel DILLARD il y a environ 2 mois
- Sujet changé de REVIEW - Recherche avancée : Recherche par critère d'annotation erreur "Unexpected token '<' " " ... is not valid JSON" à REVIEW - Recherche avancée : Recherche par critère d'annotation erreur "Unexpected token '<' " " ... is not valid JSON" si les warning sont activés au niveau de PHP
- Description mis à jour (diff)
- Statut changé de R&D - A étudier à R&D - A planifier
Actions
#9
Mis à jour par Cynthia APURA il y a environ un mois
- Statut changé de R&D - A planifier à R&D - En cours
- Version cible mis à 2301.4.7
Actions
#10
Mis à jour par Joseph AKEL il y a environ un mois
- Copié vers Anomalie #32433: REVIEW (24) - Recherche avancée : Recherche par critère d'annotation erreur "Unexpected token '<' " " ... is not valid JSON" si les warning sont activés au niveau de PHP ajouté
Actions
#11
Mis à jour par GIT LAB il y a environ un mois
[CREATION] MR sur 2301_releases (fix/32181/2301.4.x) par Joseph AKEL joseph.akel@maarch.org
https://labs.maarch.org/devteam/maarch-courrier-dev/commit/70306137961ae63b5c39aa806185c74899fbaec5
Actions
#12
Mis à jour par Joseph AKEL il y a environ un mois
- Statut changé de R&D - En cours à R&D - En test
Actions
#13
Mis à jour par Joseph AKEL il y a 29 jours
- Statut changé de R&D - En test à R&D - Terminé
Actions