Page MenuHomePhabricator

Exception: Flow\Diff\FlowBoardContentDiffView: could not maintain backwards compatibility. Please use a SlotDiffRenderer.
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   Exception: Flow\Diff\FlowBoardContentDiffView: could not maintain backwards compatibility. Please use a SlotDiffRenderer.
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.1/includes/diff/DifferenceEngine.php(1442)
#0 /srv/mediawiki/php-1.37.0-wmf.1/includes/diff/DifferenceEngineSlotDiffRenderer.php(57): DifferenceEngine->generateContentDiffBody(Flow\Content\BoardContent, Flow\Content\BoardContent)
#1 /srv/mediawiki/php-1.37.0-wmf.1/includes/diff/DifferenceEngine.php(1255): DifferenceEngineSlotDiffRenderer->getDiff(Flow\Content\BoardContent, Flow\Content\BoardContent)
#2 /srv/mediawiki/php-1.37.0-wmf.1/includes/api/ApiComparePages.php(178): DifferenceEngine->getDiffBody()
#3 /srv/mediawiki/php-1.37.0-wmf.1/includes/api/ApiMain.php(1652): ApiComparePages->execute()
#4 /srv/mediawiki/php-1.37.0-wmf.1/includes/api/ApiMain.php(622): ApiMain->executeAction()
#5 /srv/mediawiki/php-1.37.0-wmf.1/includes/api/ApiMain.php(593): ApiMain->executeActionWithErrorHandling()
#6 /srv/mediawiki/php-1.37.0-wmf.1/api.php(90): ApiMain->execute()
#7 /srv/mediawiki/php-1.37.0-wmf.1/api.php(45): wfApiMain()
#8 /srv/mediawiki/w/api.php(3): require(string)
#9 {main}
Impact

Fallout from the ContentHandler MCR migration several years ago. Only happened once today so probably triggered by some uncommon operation. Causes some kind of diff to fail.

Notes

Details

Request URL
https://fr.wikipedia.org/w/api.php?action=compare&torelative=*&fromrev=*&format=*&origin=*

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
kostajh triaged this task as Medium priority.May 4 2021, 1:45 PM
kostajh moved this task from Inbox to Triaged on the Growth-Team board.

Noticed a few of these today all from a single wiki. It's reproducible a GET to the URL in logstash.

Error
normalized_message
[{reqId}] {exception_url}   Exception: Flow\Diff\FlowBoardContentDiffView: could not maintain backwards compatibility. Please use a SlotDiffRenderer.
exception.trace
from /srv/mediawiki/php-1.38.0-wmf.17/includes/diff/DifferenceEngine.php(1409)
#0 /srv/mediawiki/php-1.38.0-wmf.17/includes/diff/DifferenceEngineSlotDiffRenderer.php(57): DifferenceEngine->generateContentDiffBody(Flow\Content\BoardContent, Flow\Content\BoardContent)
#1 /srv/mediawiki/php-1.38.0-wmf.17/includes/diff/DifferenceEngine.php(1221): DifferenceEngineSlotDiffRenderer->getDiff(Flow\Content\BoardContent, Flow\Content\BoardContent)
#2 /srv/mediawiki/php-1.38.0-wmf.17/includes/api/ApiComparePages.php(205): DifferenceEngine->getDiffBody()
#3 /srv/mediawiki/php-1.38.0-wmf.17/includes/api/ApiMain.php(1889): ApiComparePages->execute()
#4 /srv/mediawiki/php-1.38.0-wmf.17/includes/api/ApiMain.php(868): ApiMain->executeAction()
#5 /srv/mediawiki/php-1.38.0-wmf.17/includes/api/ApiMain.php(839): ApiMain->executeActionWithErrorHandling()
#6 /srv/mediawiki/php-1.38.0-wmf.17/api.php(90): ApiMain->execute()
#7 /srv/mediawiki/php-1.38.0-wmf.17/api.php(45): wfApiMain()
#8 /srv/mediawiki/w/api.php(3): require(string)
#9 {main}

The same GET request also generates a warning: Revision <revid> is the earliest revision of <title>, there is no revision for \"torelative=prev\" to compare to. (And indeed it's a Flow topic with a single revision.) So I'm a bit confused at what's being diffed to what here.

In any case, as the comment above the exception says,

// This will happen when a content model has no custom slot diff renderer, it does have
// a custom difference engine, but that does not override this method.

("this method" being DifferenceEngine::generateContentDiffBody())
Seems easy enough to fix.

Change 756752 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/Flow@master] Avoid exceptions in action=compare API

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

Urbanecm_WMF changed the task status from Open to In Progress.Jan 31 2022, 11:34 AM

Change 756752 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Avoid exceptions in action=compare API

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

kostajh changed the task status from In Progress to Open.Feb 1 2022, 10:15 AM