Setup
- Maps version: 12.1.2 (master-dev)
- MW version: 1.45
- PHP version: 8.2
- SMW version: 7.0 (master-dev)
Issue
Hi! I'm testing the latest SMW (7.0), but when I try to produce a simple map via an #ask query, I get
/w/index.php?title=Map&action=submit TypeError: Maps\SemanticMW\QueryHandler::setShowSubject(): Argument #1 ($showSubject) must be of type bool, null given, called in /path/to/w/extensions/Maps/src/Map/SemanticFormat/MapPrinter.php on line 105
Backtrace:
from /path/to/w/extensions/Maps/src/SemanticMW/QueryHandler.php(134)
#0 /path/to/w/extensions/Maps/src/Map/SemanticFormat/MapPrinter.php(105): Maps\SemanticMW\QueryHandler->setShowSubject(null)
#1 /path/to/w/extensions/SemanticMediaWiki/src/Query/ResultPrinters/ResultPrinter.php(361): Maps\Map\SemanticFormat\MapPrinter->getResultText(SMW\Query\QueryResult, int)
#2 /path/to/w/extensions/SemanticMediaWiki/src/Query/ResultPrinters/ResultPrinter.php(323): SMW\Query\ResultPrinters\ResultPrinter->buildResult(SMW\Query\QueryResult)
#3 /path/to/w/extensions/SemanticMediaWiki/src/Query/QueryProcessor.php(374): SMW\Query\ResultPrinters\ResultPrinter->getResult(SMW\Query\QueryResult, array, int)
#4 /path/to/w/extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(339): SMW\Query\QueryProcessor::getResultFromQuery(SMW\Query\Query, array, int, int)
#5 /path/to/w/extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(170): SMW\ParserFunctions\AskParserFunction->doFetchResultsFromFunctionParameters(array, array)
#6 /path/to/w/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(341): SMW\ParserFunctions\AskParserFunction->parse(array)
#7 /path/to/w/includes/parser/Parser.php(3406): SMW\ParserFunctionFactory->SMW\{closure}(MediaWiki\Parser\Parser, string, string, string)
#8 /path/to/w/includes/parser/Parser.php(3061): MediaWiki\Parser\Parser->callParserFunction(MediaWiki\Parser\PPFrame_Hash, string, array, bool)
#9 /path/to/w/includes/parser/PPFrame_Hash.php(266): MediaWiki\Parser\Parser->braceSubstitution(array, MediaWiki\Parser\PPFrame_Hash)
#10 /path/to/w/includes/parser/Parser.php(2884): MediaWiki\Parser\PPFrame_Hash->expand(MediaWiki\Parser\PPNode_Hash_Tree, int)
#11 /path/to/w/includes/parser/Parser.php(1519): MediaWiki\Parser\Parser->replaceVariables(string)
#12 /path/to/w/includes/parser/Parser.php(606): MediaWiki\Parser\Parser->internalParse(string)
#13 /path/to/w/includes/content/WikitextContentHandler.php(375): MediaWiki\Parser\Parser->parse(string, MediaWiki\Title\Title, MediaWiki\Parser\ParserOptions, bool, bool, null)
#14 /path/to/w/includes/content/ContentHandler.php(1574): MediaWiki\Content\WikitextContentHandler->fillParserOutput(MediaWiki\Content\WikitextContent, MediaWiki\Content\Renderer\ContentParseParams, MediaWiki\Parser\ParserOutput)
#15 /path/to/w/includes/content/Renderer/ContentRenderer.php(67): MediaWiki\Content\ContentHandler->getParserOutput(MediaWiki\Content\WikitextContent, MediaWiki\Content\Renderer\ContentParseParams)
#16 /path/to/w/includes/editpage/EditPage.php(4236): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput(MediaWiki\Content\WikitextContent, MediaWiki\Title\Title, null, MediaWiki\Parser\ParserOptions)
#17 /path/to/w/includes/editpage/EditPage.php(4139): MediaWiki\EditPage\EditPage->doPreviewParse(MediaWiki\Content\WikitextContent)
#18 /path/to/w/includes/editpage/EditPage.php(3015): MediaWiki\EditPage\EditPage->getPreviewText()
#19 /path/to/w/includes/editpage/EditPage.php(764): MediaWiki\EditPage\EditPage->showEditForm()
#20 /path/to/w/includes/actions/EditAction.php(55): MediaWiki\EditPage\EditPage->edit()
#21 /path/to/w/includes/actions/SubmitAction.php(29): MediaWiki\Actions\EditAction->show()
#22 /path/to/w/includes/actions/ActionEntryPoint.php(748): MediaWiki\Actions\SubmitAction->show()
#23 /path/to/w/includes/actions/ActionEntryPoint.php(506): MediaWiki\Actions\ActionEntryPoint->performAction(MediaWiki\Page\Article, MediaWiki\Title\Title)
#24 /path/to/w/includes/actions/ActionEntryPoint.php(144): MediaWiki\Actions\ActionEntryPoint->performRequest()
#25 /path/to/w/includes/MediaWikiEntryPoint.php(184): MediaWiki\Actions\ActionEntryPoint->execute()
#26 /path/to/w/index.php(44): MediaWiki\MediaWikiEntryPoint->run()
#27 {main}
I tried "fixing" this issue by replacing $queryHandler->setShowSubject( $params['showtitle'] );
for $queryHandler->setShowSubject( $params['showtitle'] ?? false ); in MapPrinter.php:105, but then I got another similar error. I "fixed" that one too, and then like 10 more, until I got a different error. Then I "fixed" that one too and got yet another, different error. So I think the Maps extension is basically out-of-sync with the latest SMW version.
Steps to reproduce the observation:
- Install the latest SMW (7.0 master-dev) and the latest Maps extension (12.1.2 master-dev)
- Create a page with
[[Coordinates::40° 51' 59.46" N, 124° 4' 58.22" W]]
- Create another page with a map like:
{{#ask:
[[Coordinates::+]]
? Coordinates
| format = map
}}
Setup
Issue
Hi! I'm testing the latest SMW (7.0), but when I try to produce a simple map via an #ask query, I get
I tried "fixing" this issue by replacing
$queryHandler->setShowSubject( $params['showtitle'] );for
$queryHandler->setShowSubject( $params['showtitle'] ?? false );in MapPrinter.php:105, but then I got another similar error. I "fixed" that one too, and then like 10 more, until I got a different error. Then I "fixed" that one too and got yet another, different error. So I think the Maps extension is basically out-of-sync with the latest SMW version.Steps to reproduce the observation:
[[Coordinates::40° 51' 59.46" N, 124° 4' 58.22" W]]