Page MenuHomePhabricator

"Sessions are disabled for this entry point" triggered by User->loadFromSession() despite MW_NO_SESSION
Closed, ResolvedPublic

Description

I know, this is probably an edge case, but there are still instances, where a user object tries to load data from session despite MW_NO_SESSION is set.

  • MW 1.30 upwards
  • Extension:CodeMirror on REL1_30 [0]
  • Extension:BootstrapComponents [1]

The case is reported on github [2] and only occours when Extensions CodeMirror and BootstrapComponents are installed.

What happens (roughly):

  • while CodeMirror is active, BootstrapComponents is instanciated during a request to load.php: https://localhost/w/repo/load.php?lang=en&modules=startup&only=scripts&skin=vector&debug=true
  • BootstrapComponents then tries to get the current skin from RequestContext
  • this translages into an "illegal" call to User->loadFromSession()

Note, that this exception is only thrown in 1_30 upwards.

I fixed the exception in BootstrapComponents, so I don't need any help for that. Why do I report this:

  • It feels unintuitive to check for MW_NO_SESSION only to get the current skin. But if this is the solution and "I" am the responsible party, please tell me
  • I think, there is an underlying problem, but I can't pinpoint it
  • I don't know, it this is important enough to follow up. If not, just close it.

relates to T127233

[0]: https://www.mediawiki.org/wiki/Extension:CodeMirror
[1]: https://www.mediawiki.org/wiki/Extension:BootstrapComponents
[2]: https://github.com/oetterer/BootstrapComponents/issues/9

Event Timeline

Restricted Application added a project: Community-Tech. · View Herald TranscriptFeb 20 2018, 10:34 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Kghbln renamed this task from "Sessions are disabled for this entry point" triggert by User->loadFromSession() despite MW_NO_SESSION to "Sessions are disabled for this entry point" triggered by User->loadFromSession() despite MW_NO_SESSION.Feb 20 2018, 3:41 PM
Krinkle closed this task as Resolved.EditedDec 17 2019, 9:06 PM
Krinkle claimed this task.
Krinkle added a subscriber: Krinkle.

Was an issue with BootstrapComponents from what I can see.

The issue was resolved at https://github.com/oetterer/BootstrapComponents/issues/9.