Jump to content

Topic on Extension talk:MobileFrontend

Declaration of MobileFormatter::parseItemsToRemove() must be compatible with HtmlFormatter

1
Spiros71 (talkcontribs)

MW 1.39.8. I am getting this error and blank page when I try to use the extension (tried php 7.4 and 8.1).

Fatal error: Declaration of MobileFormatter::parseItemsToRemove() must be compatible with HtmlFormatter\HtmlFormatter::parseItemsToRemove(): array in MobileFrontend/includes/MobileFormatter.php on line 67

Using

wfLoadExtension( 'MobileFrontend' );
wfLoadSkin( 'MinervaNeue' );
$wgDefaultMobileSkin = 'minerva';

Edit: Looks like it is an issue with HTML formatter versions. If I use in vendor/wikimedia/html-formatter

HTML formatter 3.0.1, MobileFrontend works BUT TextExtracts/Popups DO NOT work

Conversely with HTML formatter 4.0.3, TextExtracts/Popups work but not MobileFrontend.

See https://phabricator.wikimedia.org/T376029

Reply to "Declaration of MobileFormatter::parseItemsToRemove() must be compatible with HtmlFormatter"