Project

General

Profile

Bug #71789

multilinguisme, supported_languages vide (IndexError: list index out of range)

Added by Sentry Io 2 months ago. Updated about 1 month ago.

Status:
Solution déployée
Priority:
Normal
Target version:
-
Start date:
28 November 2022
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

Description

https://sentry.entrouvert.org/entrouvert/publik/issues/97531/

IndexError: list index out of range
(6 additional frame(s) were not displayed)
...
  File "wcs/backoffice/root.py", line 86, in _q_traverse
    return super()._q_traverse(path)
  File "quixote/directory.py", line 116, in _q_traverse
    return super(AccessControlled, self)._q_traverse(path)
  File "quixote/directory.py", line 88, in _q_traverse
    return obj._q_traverse(path)
  File "quixote/directory.py", line 92, in _q_traverse
    return obj()
  File "wcs/backoffice/i18n.py", line 71, in _q_index
    'selected_language': get_request().form.get('lang') or supported_languages[0][0],

Files

Associated revisions

Revision 57b2b4ae (diff)
Added by Frédéric Péters about 1 month ago

misc: raise a 404 if i18n page is accessed with i18n being disabled (#71789)

History

#1

Updated by Lauréline Guérin 2 months ago

  • Project changed from Suivi des traces to w.c.s.
  • Subject changed from IndexError: list index out of range to multilinguisme, supported_languages vide (IndexError: list index out of range)
#2

Updated by Thomas Noël 2 months ago

(plus exactement, dans la traceback, on voit que supported_languages est une liste vide)

#3

Updated by Frédéric Péters 2 months ago

  • Status changed from Nouveau to Information nécessaire
  • Assignee set to Alexis Mathias

Ça ne devrait pas pouvoir se faire.

Alexis, peux-tu décrire ce que tu as suivi comme écrans pour activer le multilinguisme ?

#4

Updated by Frédéric Péters about 1 month ago

Comme il n'y aura pas de réponse j'ai relu le code et mon hypothèse est un accès à la page i18n/ alors que le multilinguisme n'était pas activé; voici un patch pour retourner une 404 dans cette situation.

#5

Updated by Lauréline Guérin about 1 month ago

  • Status changed from Solution proposée to Solution validée
#6

Updated by Frédéric Péters about 1 month ago

  • Status changed from Solution validée to Résolu (à déployer)
commit 57b2b4ae3eeae67f0470a2e445b16f27a05beb15
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Sun Jan 1 19:24:04 2023 +0100

    misc: raise a 404 if i18n page is accessed with i18n being disabled (#71789)
#7

Updated by Transition automatique about 1 month ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF