Extension:MobileFrontendContentProvider

The MobileFrontendContentProvider allows developers to make MediaWiki ignore the database and use HTTP APIs to access wiki page content. At the time of writing it can only be used for read only views.

MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
MobileFrontendContentProvider
Release status: stable
Description Provides developer tools for testing on the content of a foreign wiki.
Author(s)
MediaWiki 1.33+[1]
PHP 5.5.9+
License GNU General Public License 2.0 or later
Download
Translate the MobileFrontendContentProvider extension if it is available at translatewiki.net

Check usage and version matrix.

Issues Open tasks · Report a bug

SetupEdit

MobileFrontendContentProvider was previously part of Extension:MobileFrontend. It can be configured locally to render articles from other MediaWiki instances. See this YouTube demo video

This can help you debug problems locally instead of importing articles which may have dependencies on various templates and Wikibase identifiers from production to your local instance.

This extension is a developer tool and is not recommended for production usage.

View another projectEdit

The code below will turn your local MediaWiki site into a Wikivoyage viewer:

$wgMFContentProviderClass = 'MobileFrontend\ContentProviders\MwApiContentProvider';
$wgMFMwApiContentProviderBaseUri = 'https://en.m.wikivoyage.org/w/api.php';

This is particularly useful for testing different mobile skins in Extension:MobileFrontend using the wgMFDefaultSkinClass config option.

Testing Parsoid contentEdit

The extension can be used to test content from the Parsoid parser.

$wgMFContentProviderClass = 'MobileFrontend\ContentProviders\ParsoidContentProvider';

Local contentEdit

In some cases you may want to be able to test both local and foreign content. When enabled local content will be used if it exists. When disabled it will always be ignored.

$wgMFContentProviderTryLocalContentFirst = true;
  1. :Fatal error: Uncaught ExtensionDependencyError: MobileFrontend is not compatible with the current MediaWiki core (version 1.32.2), it requires: >= 1.33.0.