SemanticMediaWiki / SemanticResultFormats

Provides additional visualizations (result formats) for Semantic MediaWiki
https://www.semantic-mediawiki.org/wiki/Extension:Semantic_Result_Formats
Other
45 stars 75 forks source link

Usage of deprecated $wgParser #662

Closed alex-mashin closed 2 years ago

alex-mashin commented 2 years ago

Setup:

Version
MediaWiki 1.35.3 (d9bce70)00:27, 10 сентября 2021
PHP 7.4.23 (fpm-fcgi)
MariaDB 10.6.4-MariaDB-1:10.6.4+maria~hirsute-log
Semantic External Query Lookup 1.0.0-alpha (590b0d6) 15:58, 7 мая 2021
Semantic Extra Special Properties 2.1.0
Semantic MediaWiki 3.2.3
Semantic Meta Tags 2.1.0-alpha (5b4d1f3) 16:35, 21 сентября 2020
Semantic Result Formats 3.2.0
Semantic Scribunto 2.1.0

Debug mode ($wgDebug…) is on.

MediaWiki issues a message: Deprecated: Use of $wgParser was deprecated in MediaWiki 1.32. [Called from SMW\Query\ResultPrinters\ResultPrinter::buildResult in /var/www/wiki/w/extensions/SemanticMediaWiki/src/Query/ResultPrinters/ResultPrinter.php at line 341] in /var/www/wiki/w/includes/debug/MWDebug.php on line 430.

Most probably, this is caused by

        // Calls graphvizParserHook function from MediaWiki GraphViz extension
        $result = $GLOBALS['wgParser']->recursiveTagParse( "<graphviz>" . $graphFormatter->getGraph
                () . "</graphviz>" );

in SemanticResultFormats/src/Graph/GraphPrinter.php.

Please, do not decline the issue because GraphViz is not compatible with latest or stable versions of MediaWiki, including 1.35. There are workarounds.