Page MenuHomePhabricator

"TopicListQuery.php: Cannot unpack array with string keys"
Closed, ResolvedPublic

Description

I'm seeing this error on an existing talk page on a local wiki. Am running master MW and Flow, and have run maintenance/update.php. Other Flow pages on the wiki work fine.

[c392700c32f34f370999b617] Talk:Main_Page Error from line 136 of extensions/Flow/includes/Formatter/TopicListQuery.php: Cannot unpack array with string keys

Backtrace:

#0 extensions/Flow/includes/Formatter/TopicListQuery.php(40): Flow\Formatter\TopicListQuery->collectPostIds(array)
#1 extensions/Flow/includes/Block/TopicListBlock.php(293): Flow\Formatter\TopicListQuery->getResults(array)
#2 extensions/Flow/includes/View.php(225): Flow\Block\TopicListBlock->renderApi(array)
#3 extensions/Flow/includes/View.php(70): Flow\View->buildApiResponse(Flow\WorkflowLoader, array, string, array)
#4 extensions/Flow/includes/Actions/Action.php(112): Flow\View->show(Flow\WorkflowLoader, string)
#5 extensions/Flow/includes/Actions/ViewAction.php(20): Flow\Actions\FlowAction->showForAction(string, OutputPage)
#6 extensions/Flow/includes/Actions/Action.php(50): Flow\Actions\ViewAction->showForAction(string)
#7 core/includes/MediaWiki.php(500): Flow\Actions\FlowAction->show()
#8 core/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#9 core/includes/MediaWiki.php(867): MediaWiki->performRequest()
#10 core/includes/MediaWiki.php(524): MediaWiki->main()
#11 core/index.php(42): MediaWiki->run()
#12 {main}

Event Timeline

Esanders created this task.Jul 3 2018, 6:36 PM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptJul 3 2018, 6:36 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I did var_dump($nodeList) on the line before the exception:

array(3) {
  ["sucy3ehmwotrzndq"]=>
  array(15) {
    ["sucy3ehmwotrzndq"]=>
    object(Flow\Model\UUID)#1413 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "sucy3ehmwotrzndq"
      ["timestamp":protected]=>
      NULL
    }
    ["sucy3ehq0zo3s2se"]=>
    object(Flow\Model\UUID)#1414 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "sucy3ehq0zo3s2se"
      ["timestamp":protected]=>
      NULL
    }
    ["sultbwfgg10uiz32"]=>
    object(Flow\Model\UUID)#1415 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "sultbwfgg10uiz32"
      ["timestamp":protected]=>
      NULL
    }
    ["t13ey6eezhrrucl3"]=>
    object(Flow\Model\UUID)#1416 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "t13ey6eezhrrucl3"
      ["timestamp":protected]=>
      NULL
    }
    ["t7ezqo017hk4onqv"]=>
    object(Flow\Model\UUID)#1417 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "t7ezqo017hk4onqv"
      ["timestamp":protected]=>
      NULL
    }
    ["t7f0dojduioioenr"]=>
    object(Flow\Model\UUID)#1418 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "t7f0dojduioioenr"
      ["timestamp":protected]=>
      NULL
    }
    ["tb5aw7wu9poafrcn"]=>
    object(Flow\Model\UUID)#1419 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "tb5aw7wu9poafrcn"
      ["timestamp":protected]=>
      NULL
    }
    ["tlyp96rpr608sunr"]=>
    object(Flow\Model\UUID)#1420 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "tlyp96rpr608sunr"
      ["timestamp":protected]=>
      NULL
    }
    ["tti5wfw14v52h9vb"]=>
    object(Flow\Model\UUID)#1421 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "tti5wfw14v52h9vb"
      ["timestamp":protected]=>
      NULL
    }
    ["tti61n4qvjb9s5yv"]=>
    object(Flow\Model\UUID)#1422 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "tti61n4qvjb9s5yv"
      ["timestamp":protected]=>
      NULL
    }
    ["tti6dt8hjwqjskl3"]=>
    object(Flow\Model\UUID)#1423 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "tti6dt8hjwqjskl3"
      ["timestamp":protected]=>
      NULL
    }
    ["u748kg8axkx3xy5z"]=>
    object(Flow\Model\UUID)#1424 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "u748kg8axkx3xy5z"
      ["timestamp":protected]=>
      NULL
    }
    ["u749yz7aasqkpkxj"]=>
    object(Flow\Model\UUID)#1425 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "u749yz7aasqkpkxj"
      ["timestamp":protected]=>
      NULL
    }
    ["u74am3r58wdbbvav"]=>
    object(Flow\Model\UUID)#1426 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "u74am3r58wdbbvav"
      ["timestamp":protected]=>
      NULL
    }
    ["uc04g8znxvmcb1vb"]=>
    object(Flow\Model\UUID)#1427 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "uc04g8znxvmcb1vb"
      ["timestamp":protected]=>
      NULL
    }
  }
  ["u9eolrqf7gh8s4l3"]=>
  array(2) {
    ["u9eolrqf7gh8s4l3"]=>
    object(Flow\Model\UUID)#1428 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "u9eolrqf7gh8s4l3"
      ["timestamp":protected]=>
      NULL
    }
    ["u9eolrqgrmvx8d9z"]=>
    object(Flow\Model\UUID)#1429 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "u9eolrqgrmvx8d9z"
      ["timestamp":protected]=>
      NULL
    }
  }
  ["tuhzerifusdmfuif"]=>
  array(4) {
    ["tuhzerifusdmfuif"]=>
    object(Flow\Model\UUID)#1430 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "tuhzerifusdmfuif"
      ["timestamp":protected]=>
      NULL
    }
    ["tuhzeriheysaw37b"]=>
    object(Flow\Model\UUID)#1431 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "tuhzeriheysaw37b"
      ["timestamp":protected]=>
      NULL
    }
    ["tveyw71m0i6dg853"]=>
    object(Flow\Model\UUID)#1432 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "tveyw71m0i6dg853"
      ["timestamp":protected]=>
      NULL
    }
    ["u1o8skoz326dcd2v"]=>
    object(Flow\Model\UUID)#1433 (4) {
      ["binaryValue":protected]=>
      NULL
      ["hexValue":protected]=>
      NULL
      ["alphadecimalValue":protected]=>
      string(16) "u1o8skoz326dcd2v"
      ["timestamp":protected]=>
      NULL
    }
  }
}

This appears to be happening on my other existing flow page now too. Creating a new flow page appears to work fine though.

MMiller_WMF moved this task from Inbox to Triaged but Future on the Growth-Team board.
MMiller_WMF added a subscriber: MMiller_WMF.

Putting this into "Triaged but Future" in case someone experiences this again.

Change 453652 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/Flow@master] Fix array_merge pattern with spread operator for associative arrays

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

@Catrope @SBisson I came across this today while working on something else. I'm not sure if you'll be able to reproduce, but for me it happened in this scenario:

  • MW Vagrant environment
  • Flow configuration variables in LocalSettings:
$wgNamespaceContentModels[NS_TALK] = 'flow-board';
$wgNamespaceContentModels[NS_USER_TALK] = 'flow-board';
$wgFlowServerCompileTemplates = false;
  • In Special:NewPagesFeed as Admin, add some tags with a note on a page in New Page Patrol created by a different user and save. You can verify via the Network tab that a new topic is being created on that user's Talk page.
  • Go to the user's talk page, and you should see the error noted in this task title

Applying the patch results in the talk page loading correctly.

I might not be searching the logs correctly but I couldn't find instances of this happening in production.

SBisson assigned this task to kostajh.Aug 20 2018, 12:46 PM
SBisson edited projects, added Growth-Team (Current Sprint); removed Growth-Team.
SBisson moved this task from Incoming to QA on the Growth-Team (Current Sprint) board.

Change 453652 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Fix array_merge pattern with spread operator for associative arrays

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

Works for me too, thanks!!

Etonkovidova closed this task as Resolved.Aug 20 2018, 9:30 PM
Etonkovidova added a subscriber: Etonkovidova.

Checked in betalabs - notes from PageTriage tags are placed on Flow user talk pages.