Page MenuHomePhabricator

Undefined property stdClass::$name in VisualEditorDataModule
Closed, ResolvedPublic1 Estimated Story PointsPRODUCTION ERROR

Description

Spotted in production:

Notice: Undefined property: stdClass::$name in /srv/mediawiki/php-1.27.0-wmf.8/extensions/VisualEditor/VisualEditorDataModule.php on line 109

Event Timeline

demon raised the priority of this task from to Medium.
demon updated the task description. (Show Details)
demon subscribed.

We need to know which wiki this is coming from.

I made a custom mwgrep to list all of the wikis which have a MediaWiki:visualeditor-cite-tool-definition.json page. I then checked through them manually and only https://fo.wikipedia.org/wiki/MediaWiki:Visualeditor-cite-tool-definition.json looks like it will cause this error.

Wiki is not...logged? Here's the full JSON from a sample entry:

{
  "_index": "logstash-2015.12.17",
  "_type": "hhvm",
  "_id": "AVGwwgp3lAIL90ZzPjWT",
  "_score": null,
  "_source": {
    "message": "Notice: Undefined property: stdClass::$name in /srv/mediawiki/php-1.27.0-wmf.8/extensions/VisualEditor/VisualEditorDataModule.php on line 109",
    "@version": "1",
    "@timestamp": "2015-12-17T16:24:44.000Z",
    "type": "hhvm",
    "host": "mw1248",
    "priority": 11,
    "timestamp": "Dec 17 16:24:44",
    "logsource": "mw1248",
    "program": "hhvm",
    "severity": 3,
    "facility": 1,
    "facility_label": "user-level",
    "severity_label": "Error",
    "level": "NOTICE",
    "tags": [
      "syslog",
      "es",
      "normalized_message_untrimmed"
    ],
    "normalized_message": "Notice: Undefined property: stdClass::$name in /srv/mediawiki/php-1.27.0-wmf.8/extensions/VisualEditor/VisualEditorDataModule.php on line 109"
  },
  "sort": [
    1450369484000
  ]
}

And the first error in the log is just two minutes after that was created. I'll make a patch to have VE ignore such invalid definitions and fix the keys in that message.

Change 259738 had a related patch set uploaded (by Alex Monk):
Avoid checking non-set keys in user-defined data

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

So the errors should have stopped, but leaving this open until the patch is merged.

Can confirm errors have stopped. Thanks for quickly figuring this out :)

Change 259738 merged by jenkins-bot:
Avoid checking non-set keys in user-defined data

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

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:11 PM