Project

General

Profile

Actions

Anomalie #32181

closed

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

Added by Cynthia APURA 23 days ago. Updated 3 days ago.

Status:
R&D - Terminé
Priority:
1-Majeur
Assignee:
Target version:
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

![](clipboard-202411191208-yokub.png)

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

clipboard-202501221605-s5fyg.png (14 KB) clipboard-202501221605-s5fyg.png Cynthia APURA, 01/22/2025 04:05 PM

Related issues 1 (0 open1 closed)

Copied to Backlog Courrier - 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 PHPR&D - TerminéJoseph AKEL11/19/2024Actions
Actions #2

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
Actions #4

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"
Actions #5

Updated by Cynthia APURA 23 days ago

  • Description updated (diff)
Actions #6

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
Actions #8

Updated by Joseph AKEL 4 days ago

  • Assignee set to Joseph AKEL
Actions #9

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
Actions #10

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
Actions #11

Updated by GIT LAB 4 days ago

Actions #12

Updated by Joseph AKEL 4 days ago

  • Status changed from R&D - En cours to R&D - En test
Actions #13

Updated by Joseph AKEL 3 days ago

  • Status changed from R&D - En test to R&D - Terminé
Actions

Also available in: Atom PDF