Ticket #442 (closed bug: fixed)

Opened 10 months ago

Last modified 8 months ago

boucle quand le message d'erreur n'existe pas dans le charset courant.

Reported by: hugues Assigned to: Julien
Priority: high Milestone: Jelix 1.0.3
Component: jelix:core:jLocale Version: 1.0.1
Severity: critical Keywords:
Cc: Php version:
Review: review+ Hosting Provider:
Documentation needed: 0 Blocking:
Blocked By: 95

Description

En changeant le charset, j'ai une erreur qui revient à chaque fois ( mais qui n'empêche pas l'affichage de ma page )

PHP Fatal error: Maximum function nesting level of '100' reached, aborting! in jelix/core/jLocale.class.php on line 132

Attachments

442-infinite-loop-when-error-not-exists-in-current-charset.diff (3.6 kB) - added by Julien on 03/09/08 15:02:18.

Change History

02/15/08 10:41:17 changed by laurentj

  • owner set to laurentj.
  • component changed from jelix to jelix:core.

02/29/08 12:39:57 changed by laurentj

  • priority changed from normal to high.
  • review changed.
  • docneeded changed.
  • severity changed from normal to critical.
  • milestone set to Jelix 1.1.

02/29/08 19:24:49 changed by Julien

  • owner changed from laurentj to Julien.

02/29/08 19:24:55 changed by Julien

  • status changed from new to assigned.

02/29/08 19:26:25 changed by Julien

Je prends le ticket en charge, car je travaille en parallèle sur le #95

03/06/08 11:12:45 changed by Julien

Ok, j'ai la solution qui fonctionne. Sur le même principe que le patch apporté par Laurent au #387.

J'ai fait en sorte qu'il aille chercher le charset UTF-8 dans la langue en_EN lorsque le message de l'exception à localiser est jelix~errors.selector.invalid.target.

De cette façon, plus de boucle infinie.

J'ai choisi UTF-8 car il n'y a pas de choix meilleur ou pire que celui-ci, de toute façon ce ne sera pas "compatible" avec le charset manquant demandé, sauf à faire des tables de compatibilité bien trop compliquées.

Comme c'est une réelle erreur technique (qui ne doit a priori jamais avoir lieu en production), je pense que en_EN en UTF-8 est valable.

Je ferai le patch ce soir en rentrant chez moi.

03/06/08 13:33:00 changed by laurentj

  • component changed from jelix:core to jelix:core:jLocale.

03/09/08 15:02:18 changed by Julien

  • attachment 442-infinite-loop-when-error-not-exists-in-current-charset.diff added.

03/09/08 15:10:04 changed by Julien

  • review set to review?.

Voici le patch, fonctionne comme annoncé au commentaire 6

03/15/08 00:14:12 changed by laurentj

  • review changed from review? to review+.
  • milestone changed from Jelix 1.1 to Jelix 1.0.3.

ça me semble ok. J'ai ajouté des tests unitaires dans la branche 1.0.x et le trunk (testWithBadCharset dans core.jlocale.html_cli.php).

Tu peux inclure le patch dans le trunk et la branche 1.0.x (pour la branche, il va falloir le faire à la main car le patch a du mal a passé à cause de différence).

Décommente aussi le code dans testWithBadCharset.

Merci :-)

03/16/08 02:53:47 changed by Julien

Hello,

code intégré dans le commit [808] pour le trunk et la branche 1.0.x

Tests unitaires Ok aussi (NB : j'ai trouvé une petite typo dans les commentaires du test unitaire, corrigée dans le commit [809])

03/16/08 02:56:54 changed by Julien

  • status changed from assigned to closed.
  • resolution set to fixed.
Download in other formats: Comma-delimited Text Tab-delimited Text RSS Feed