When page caching is enabled, we're supposed to emit "flag this!" links only. (They are later swapped in with "unflag this!" links, for flagged items.)

But this doesn't happen.

Steps to reproduce:

1. Turn page caching on.
2. Flag some nodes (using some anonymous non-global flag).
3. Clear the page cache.
4. Refresh the page. (Everything seems alright.)
5. Turn off JavaScript.
6. Refresh the page: you should see only "flag this!" links, but you see "unflag this!" links as well.

($this->theme() should be fixed. It's easy, but I'll do this after I learn more about how we handle _global_ flags.)

CommentFileSizeAuthor
#3 fix-templates.diff2 KBmooffie

Comments

mooffie’s picture

(The bug is first mentioned here, together with a note about a typo.)

mooffie’s picture

Priority: Normal » Critical

I'm marking this critical because this completely botches our support for page caching: users may see the state of other users, not their own state.

mooffie’s picture

Status: Active » Needs review
StatusFileSize
new2 KB

Here's a patch. I also fixed the comments.

mooffie’s picture

Status: Needs review » Fixed

Committed.
http://drupal.org/cvs?commit=464794
http://drupal.org/cvs?commit=464792

(I didn't wait for a review. Many reasons; for starters, I have to work on other bugs and I need this one fixed asap.)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.