LoginToboggan logged-in block sometimes may cache, causing wrong username to show
| Project: | LoginToboggan |
| Version: | 6.x-1.5 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
I noticed in the code for LoginToboggan that the logged-in block is set to BLOCK_NO_CACHE.
However, I saw on our site that the block (module = "logintoboggan", delta = 0) was set to cache = 1 on many themes. This was causing it to cache on those themes, making it unreliable as to who was actually logged in at any given time when people were viewing the site in those themes.
At first this confused me, but I think it makes sense in light of the following two facts:
- We were using LoginToboggan 5.x prior to our site's upgrade to 6.x. So we already had a block with a delta of 0 prior to the upgrade and, of course, no "cache" field in the DB.
- We have themes in 6.x with the same name as 5.x themes. In fact, the caching settings were wrong on the themes that had the same name, and right on all the other ones.
So, basically, it looks like there needs to be code in the LoginToboggan update routine for people upgrading from 5.x to 6.x to ensure that the caching settings get applied correctly. As for me, I corrected this issue in the database by issuing the following query:
UPDATE blocks SET cache = -1 WHERE module = "logintoboggan" AND delta = 0

#1
this sounds like a bug in the theme upgrades from 5.x to 6.x, not in logintoboggan. seems to me that this should be fixed there so other module's blocks don't suffer the same issue. i would encourage you to reopen this issue in the issue queue of one of those themes.