Page MenuHomePhabricator

ApiStashEdit warning and notices
Closed, ResolvedPublic0 Estimated Story PointsPRODUCTION ERROR

Description

From 1.28.0-wmf.6

Warning: parseAndStash() expects exactly 4 parameters, 3 given in /srv/mediawiki/php-1.28.0-wmf.6/includes/api/ApiStashEdit.php on line 182
Notice: Undefined variable: summary in /srv/mediawiki/php-1.28.0-wmf.6/includes/api/ApiStashEdit.php on line 157
$ git log --oneline origin/wmf/1.28.0-wmf.5..origin/wmf/1.28.0-wmf.6 includes/api/ApiStashEdit.php

rMW7898fd2fa969 Perform edit stashing when the edit preview or diff form is requested
cb68ff0 Send the edit summary/user to the edit stash API
a74346b Add more logging info to parseAndStash() for uncacheable content
e40b678 Simplify ApiStashEdit::checkCache()
6f86660 Include title/user in some edit stash log messages
801db2a Merge "Reject authentication data change when there are warnings"

Event Timeline

So looks like the stash edit accepts "summary" as a parameter (which is required by the function) but it is not defined as a parameter in getAllowedParams().

No idea how the API works, but I would expect it to silently discard the 'summary' key from the list of parameters, causing the executing function to spurt the warning.

EDIT: disregard the above. I have misread.

Change 294750 had a related patch set uploaded (by Aaron Schulz):
Pass empty summary to parseAndStash() to avoid warnings

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

Not much user impact, and it is an easy fix for VisualEditor backend code. Thank you Aaron!

Change 294833 had a related patch set uploaded (by Hashar):
Pass empty summary to parseAndStash() to avoid warnings

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

Change 294833 merged by jenkins-bot:
Pass empty summary to parseAndStash() to avoid warnings

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

Change 294840 had a related patch set uploaded (by Hashar):
Update VisualEditor

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

Change 294750 merged by jenkins-bot:
Pass empty summary to parseAndStash() to avoid warnings

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

Mentioned in SAL [2016-06-16T21:15:28Z] <hashar@tin> Synchronized php-1.28.0-wmf.6/extensions/VisualEditor/ApiVisualEditor.php: Pass empty summary to parseAndStash() to avoid warnings T137995 (duration: 00m 39s)

Error as disappeared from the logs. Thanks Aaron!

Jdforrester-WMF set the point value for this task to 0.
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:11 PM