Page MenuHomePhabricator

Cannot read property 'session' of undefined
Closed, ResolvedPublic

Description

Getting this on a fresh vagrant box with the flow role; it breaks the Flow pages (they look OK but are unresponsive):

load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=11buy:52 Uncaught TypeError: Cannot read property 'session' of undefined
    at new mwFlowUiNewTopicWidget (<anonymous>:442:136)
    at mw.flow.Initializer.setupNewTopicWidget (<anonymous>:518:484)
    at mw.flow.Initializer.initializeWidgets (<anonymous>:515:62)
    at HTMLDocument.<anonymous> (<anonymous>:533:408)
    at mightThrow (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=11buy:49)
    at process (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=11buy:49)

Event Timeline

This was right after T246313: Vagrant flow role: SELECT command denied to user 'wikiadmin'@'localhost' for table 'flow_revision' so maybe some kind of secondary error, although the wiki seems to have recovered from that problem just fine.

The error refers to mw.storage which is indeed undefined. I wonder if it's an undeclared dependency which has now disappeared due to rMW2290afbed95f: mediawiki.user: Switch sessionId() back to session-cookie persistence...

Change 575240 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/Flow@master] Declare missing dependency on mediawiki.storage

https://gerrit.wikimedia.org/r/575240

Change 575240 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Declare missing dependency on mediawiki.storage

https://gerrit.wikimedia.org/r/575240

@Tgr -there are two Flow roles (https://phabricator.wikimedia.org/T133629) flow and wikimediaflow. When I enable wikimediaflow role, there is still the error about session.

Warning: session_name(): Cannot change session name when headers already sent in /vagrant/mediawiki/includes/Setup.php on line 779

I'm not sure whether it's a new bug (or even if wikimediaflow is relevant at all). The split was based on whether a role depends on External store. If wikimediaflow role should be used at all?

Definetly a bug (if wikimediaflow shouldn't be used, it shouldn't exist; if it exists, it should work), but not related to this one. (Also, PHP "headers already sent" errors are just a byproduct of a different error, and not really informative.)

Etonkovidova claimed this task.

Thx, @Tgr - I'll follow up on wikimediaflow to see if the issue requires fixing.