Page MenuHomePhabricator

MediaWiki installation Error: Running "query" api gives "nosuchrevid" error
Closed, DuplicatePublic

Description

I followed instructions to manually install wikimedia locally. https://www.mediawiki.org/wiki/Manual:Installation_guide#Manual_installation . I did not get any error during installation.

I ran the following command using python requests api.

PARAMS = {
    "action": "query",
    "format" : "json",
    "titles" : "Earth",
    "prop" : "extracts",
    "explaintext" : 1,
}

When I hit wikimedia endpoint which is https://en.wikipedia.org/w/api.php I get the text but when I hit the local installation endpoint which is http://localhost/mediawiki/mediawiki-1.34.2/api.php I get the following error

{'error': {'code': 'nosuchrevid', 'info': 'There is no revision with ID 969622971.', '*': 'See http://localhost/mediawiki/mediawiki-1.34.2/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.'}, 'warnings': {'extracts': {'*': '"exlimit" was too large for a whole article extracts request, lowered to 1.'}}}

I checked the revisions table in mysql and row with 969622971 exists. I tried reinstallation and running update.php. Running update.php gave me following error.

Wikimedia\Rdbms\DBQueryError from line 1603 of /var/www/html/mediawiki/mediawiki-1.34.2/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: INSERT  INTO `actor` (actor_name) VALUES ('24.4.127.164'),('Template namespace initialisation script'),('82.42.16.116')
Function: MigrateActors::addActorsForRows
Error: 1062 Duplicate entry 'Template namespace initialisation script' for key 'actor.actor_name' (localhost)

Please help me resolve this issue

Event Timeline

Aklapper renamed this task from [Wikimedia installation Error] Running "query" api gives "nosuchrevid" error to MediaWiki installation Error: Running "query" api gives "nosuchrevid" error.Sep 14 2020, 1:21 PM