Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #32 (closed defect: fixed)

Opened 14 years ago

Last modified 12 years ago

Flash message persists over multiple views

Reported by: anonymous Owned by: anonymous
Priority: normal Milestone: 0.8
Component: TurboGears Version:
Severity: normal Keywords: flash


Calling controllers.get_flash() fails to clear the turbogearsflash/tg_flash cookie under certain conditions. Adding a ..]path? = '/' to the cookie used to clear the message solves the problem.

Change History

comment:1 Changed 14 years ago by fneumann

How about using cherrypy.session for this? I suppose we don't get around using cookies in one or the other form if we don't want to use ?SESSIONID=<uglyhash>.

We could insert this in dev.cfg:

# If you want to use tg_flash() you _must_ uncomment this.
# Warning: Your app will require a cookie-enabled browser then!
# But as a benefit you get a global session via
# cherrypy.session (a dict) for free :)
#sessionFilter.on = True
#sessionFilter.cookieName = <appname>SID

Then tg_flash() could simply set/unset cherrypy.sessiontg_flash_msg?.

comment:2 Changed 14 years ago by kevin

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 0.8

I fixed the path of the cookie in 0.8.

Note: See TracTickets for help on using tickets.