Page MenuHomePhabricator

Some Hovercards show error message as text extract: "Revision 0 of page not existing"
Closed, ResolvedPublic

Description

On dewiki the hovercard for Baden-Württemberg shows a strange error message as content text extract:

Hovercard_Baden-Württemberg.png (248×450 px, 24 KB)

Hovercards makes the request https://de.wikipedia.org/w/api.php?action=query&format=json&prop=extracts|pageimages|revisions|info&redirects=true&exintro=true&exsentences=2&explaintext=true&piprop=thumbnail&pithumbsize=300&rvprop=timestamp&inprop=watched&indexpageids=true&titles=Baden-W%C3%BCrttemberg and gets the response:

{
    "warnings": {
        "query": {
            "*": "Formatting of continuation data will be changing soon. To continue using the current formatting, use the 'rawcontinue' parameter. To begin using the new format, pass an empty string for 'continue' in the initial query."
        }
    },
    "query": {
        "pageids": [
            "477"
        ],
        "pages": {
            "477": {
                "pageid": 477,
                "ns": 0,
                "title": "Baden-W\u00fcrttemberg",
                "extract": "Die Version 0 der Seite namens \u201eBaden-W\u00fcrttemberg\u201c ist nicht vorhanden.\nDieser Fehler wird normalerweise von einem veralteten Link zur Versionsgeschichte einer Seite verursacht, die zwischenzeitlich gel\u00f6scht wurde.",
                "thumbnail": {
                    "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Locator_map_Baden-W%C3%BCrttemberg_in_Germany.svg/222px-Locator_map_Baden-W%C3%BCrttemberg_in_Germany.svg.png",
                    "width": 222,
                    "height": 300
                },
                "revisions": [
                    {
                        "timestamp": "2015-03-26T07:33:13Z"
                    }
                ],
                "contentmodel": "wikitext",
                "pagelanguage": "de",
                "touched": "2015-03-26T07:33:13Z",
                "lastrevid": 140282781,
                "length": 116825,
                "watched": ""
            }
        }
    }
}

Event Timeline

Fomafix raised the priority of this task from to Needs Triage.
Fomafix updated the task description. (Show Details)
Fomafix added a project: TextExtracts.
Fomafix subscribed.

The error message also appeared on https://de.wikipedia.org/wiki/Wikipedia:L%C3%B6schkandidaten/27._M%C3%A4rz_2015. A purge fixed it.

Die Version 0 der Seite namens „Wikipedia:Löschkandidaten/27. März 2015“ ist nicht vorhanden.

Dieser Fehler wird normalerweise von einem veralteten Link zur Versionsgeschichte einer Seite verursacht, die zwischenzeitlich gelöscht wurde. Einzelheiten sind im Lösch-Logbuch einsehbar.
Aklapper renamed this task from Hovercard for article Baden-Württemberg shows error message as text extract to Hovercard for article Baden-Württemberg shows error message as text extract (fixed by purge).Mar 29 2015, 10:15 PM

Is that a common problem on several articles?
Or was that just this specific one (which got fixed by a purge)?

A purge on the article doesn't fix the problem with the hovercard. The problem with the hovercard still exists. See API request.

Currently I don't know an other article with this problem.

Fomafix renamed this task from Hovercard for article Baden-Württemberg shows error message as text extract (fixed by purge) to Hovercard for article Baden-Württemberg shows error message as text extract.Mar 30 2015, 5:01 AM

The problem appears also without hovercards, see above link.

That's core being silly and returning an error message instead of, say, throwing an exception.

A purge does not regenerate the extract because it's cached based on page id. This problem, as well as a bunch of others, should be fixed by https://www.mediawiki.org/wiki/Requests_for_comment/Text_extraction but I have no timeline for this.

See https://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28technical%29#Weird_deletion_display_error

Someone linked that thread to this report, I don't know whether it is in fact the same problem.

The error message is generated in [[https://git.wikimedia.org/blob/mediawiki%2Fcore.git/f772fc34e5862d170c657b30888f6314b0d0c926/includes%2Fpage%2FArticle.php#L368|fetchContentObject()]]. This function is strange. In the first call it fills $this->mContentObject with the error message. Then it makes some error checks and exits with return false. Then $this->mContentObject is filled with the correct content and return the object. In further calls $this->mContentObject is returned immediately. This means that the error message can only returned in a further calls as normal content. Why is $this->mContentObject not initialized with false or null?

A purge does not clear the cache of TextExtracts.

This count includes Wikipedia mirrors.

The article Baden-Württemberg was updated. The error does not occur in hovercard anymore.

Has this ever happened again, or has this problem magically vanished?

The article Baden-Württemberg currently does have a problem. The code is strange because it returns an error message as content. The preconditions to this path in the code are unclear.

The article Baden-Württemberg currently does have a problem. The code is strange because it returns an error message as content. The preconditions to this path in the code are unclear.

@Fomafix: Where and how to see that problem exactly on that page? I went to that article and don't see anything suspicious.

The concrete article was changed and so the cache for this article cleared and so not reproducible with this article.

https://www.google.de/search?q=%22Die+Version+0+der+Seite+namens%22&filter=0 currently finds about 3.860 wiki pages with the error message "Die Version 0 der Seite namens". When I click through the results it ends at 73 results. Most of the wikis does not have this error message anymore or show an other version number because of deleted revisions. I only found http://kampusch.dieaufdecker.com/index.php/Margit_Wendelberger and other pages from this wiki which have this error message with version 0. A purge does not change the result.

Maybe the code is fixed in the current code. The code around the error message is strange because it returns an error message as normal content. This message get cached so that even a purge does not clears it.

Aklapper renamed this task from Hovercard for article Baden-Württemberg shows error message as text extract to Some Hovercards show error message as text extract: "Revision 0 of page not existing".Sep 15 2015, 2:54 PM
Jdlrobson triaged this task as Medium priority.Sep 15 2015, 8:21 PM
Jdlrobson subscribed.

I think the problem is in Core not in TextExtracts.

With T117322 it would be possible to clear the cache with the wrong text in the hovercard.

dr0ptp4kt lowered the priority of this task from Medium to Low.Aug 4 2016, 3:51 PM
dr0ptp4kt moved this task from Incoming to Needs Prioritization on the Web-Team-Backlog board.

Is this still a problem? No activity in nearly 2 years.

With https://www.google.de/search?q=%22Die+Version+0+der+Seite+namens%22&filter=0 is currently find at least 4 wWikis that show that error. These Wikis use MediaWiki 1.26.2 or older. I guess this problem does not exist in the current MediaWiki version anymore.

Jdlrobson claimed this task.

Thanks @Fomafix sounds like a safe assumption to me. Let's reopen this if we see it in more modern MediaWikis.

This comment is still valid:

The error message is generated in [[https://git.wikimedia.org/blob/mediawiki%2Fcore.git/f772fc34e5862d170c657b30888f6314b0d0c926/includes%2Fpage%2FArticle.php#L368|fetchContentObject()]]. This function is strange. In the first call it fills $this->mContentObject with the error message. Then it makes some error checks and exits with return false. Then $this->mContentObject is filled with the correct content and return the object. In further calls $this->mContentObject is returned immediately. This means that the error message can only returned in a further calls as normal content. Why is $this->mContentObject not initialized with false or null?