https://bugzilla.wikimedia.org/show_bug.cgi?id=30275
Jille Timmermans <ji...@quis.cx> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |ji...@quis.cx Resolution|FIXED | --- Comment #6 from Jille Timmermans <ji...@quis.cx> 2011-09-03 23:43:37 UTC --- The committed fix (r94275) is not correct. It will still pollute the cache and might affect other parts of MediaWiki. I'll cite what I wrote to the Lockdown-talk-page: > The problem seems quite simple: > * MediaWiki starts loading the logged in user > * While loading it tries to get a list of searchable namespaces and calls the > SearchableNamespaces-hook > * Lockdown kicks in and tries to calculate the searchable namespaces, but > needs the groups for that > * Lockdown asks the user-object for the groups > * The user-object hasn't finished loading and hasn't loaded the groups yet, > so it will only give '*' as the users' groups and caches that. > * Next time Lockdown - or anything at all! - asks for the groups it will get > the cached version: '*' > Changing getEffectiveGroups() to getEffectiveGroups(true) tells MediaWiki to > ignore the cache (and even repopulate it) and it will be fixed. However, the > first time Lockdown asked for the groups it got a wrong answer so that could > cause problems. > The solution is a unfortunately a lot less simple. I think the best way will > be to let MediaWiki detect it hasn't loaded the groups yet and do that > direct. (Or just change the order so the groups will be loaded before even > thinking about searchable namespaces.) I've searched a bit more and found a solution: Add $this->clearInstanceCache(); before the end of User::load. It prevents the cache-pollution, but will still give the wrong groups the first time(s?) Lockdown asks for them. That should/could be resolved as stated in the last sentence of my cite. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l