Actions
Anomalie #32181
closedREVIEW - 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
Start date:
11/19/2024
Due date:
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
Files
Updated by Cynthia APURA 23 days ago
- Status changed from A qualifier to R&D - A étudier
- Assignee deleted (
Cynthia APURA) - Priority changed from 2-Sérieux to 1-Majeur
Updated by Cynthia APURA 23 days ago
- File clipboard-202501221605-s5fyg.png clipboard-202501221605-s5fyg.png added
- Description updated (diff)
Updated by Cynthia APURA 23 days ago
- Subject changed from REVIEW - Recherche avancée : Recherche par critère d'annotation erreur "Unexpected token '<' " " is not valid JSON" to REVIEW - Recherche avancée : Recherche par critère d'annotation erreur "Unexpected token '<' " " ... is not valid JSON"
Updated by Emmanuel DILLARD 19 days ago
- Subject changed from REVIEW - Recherche avancée : Recherche par critère d'annotation erreur "Unexpected token '<' " " ... is not valid JSON" to 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 updated (diff)
- Status changed from R&D - A étudier to R&D - A planifier
Updated by Cynthia APURA 4 days ago
- Status changed from R&D - A planifier to R&D - En cours
- Target version set to 2301.4.7
Updated by Joseph AKEL 4 days ago
- Copied to 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 added
Updated by GIT LAB 4 days ago
[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
Updated by Joseph AKEL 4 days ago
- Status changed from R&D - En cours to R&D - En test
Updated by Joseph AKEL 3 days ago
- Status changed from R&D - En test to R&D - Terminé
Actions