Project

General

Profile

Bug #9191

DisplayMessageBeforeRedirectMiddleware cannot reset the storage.used flag

Added by Benjamin Dauvergne over 3 years ago. Updated over 1 year ago.

Status:
Fermé
Priority:
Normal
Category:
-
Target version:
Start date:
03 Dec 2015
Due date:
% Done:

100%

Patch proposed:
No
Planning:
No

Description

Message storages do not work correctly if the used flag is reset to False. Instead of doing that we should only consume messages if necessary.

Associated revisions

Revision 33d3c719 (diff)
Added by Benjamin Dauvergne over 3 years ago

middleware: iterate message storage only if messages are consumed (fixes #9191)

If a message storage has been iterated but the used flag is reset to False,
semi-consumed messages are pushed to the cookie without normalization by
_prepare_message, as some of them are lazy strings, it breaks the JSON encoder.

The message storage must be iterated only if we are sure messages are going be
shown.

History

#1 Updated by Benjamin Dauvergne over 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Nouveau to Résolu (à déployer)

#2 Updated by Benjamin Dauvergne over 3 years ago

  • Target version set to 2.2.0

#3 Updated by Benjamin Dauvergne over 3 years ago

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

#4 Updated by Benjamin Dauvergne over 1 year ago

  • Status changed from Solution déployée to Fermé

Also available in: Atom PDF