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.)
Comments
Comment #1
mooffie commented(The bug is first mentioned here, together with a note about a typo.)
Comment #2
mooffie commentedI'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.
Comment #3
mooffie commentedHere's a patch. I also fixed the comments.
Comment #4
mooffie commentedCommitted.
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.)