No problem noticed with this setup:
Inserting an inline query (both #ask and #show) causes an exception:
[8853808191acf27259daa0f2] /index.php?title=Eng.srdWiki:Sandbox2&action=submit ParseError from line 69 of /var/www/html/wiki_1.32.0_SMW_3.1.0/vendor/param-processor/param-processor/src/ProcessedParam.php: syntax error, unexpected '?'
#0 /var/www/html/wiki_1.32.0_SMW_3.1.0/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile(string)
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass(string)
#2 /var/www/html/wiki_1.32.0_SMW_3.1.0/vendor/param-processor/param-processor/src/Processor.php(270): spl_autoload_call(string)
#3 /var/www/html/wiki_1.32.0_SMW_3.1.0/vendor/param-processor/param-processor/src/Processor.php(255): ParamProcessor\Processor->newProcessingResult()
#4 /var/www/html/wiki_1.32.0_SMW_3.1.0/extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(66): ParamProcessor\Processor->processParameters()
#5 /var/www/html/wiki_1.32.0_SMW_3.1.0/extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(264): SMWQueryProcessor::getProcessedParams(array, array, boolean, integer, boolean)
#6 /var/www/html/wiki_1.32.0_SMW_3.1.0/extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(296): SMWQueryProcessor::getQueryAndParamsFromFunctionParams(array, integer, integer, boolean, SMW\DIWikiPage)
#7 /var/www/html/wiki_1.32.0_SMW_3.1.0/extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(197): SMW\ParserFunctions\AskParserFunction->doFetchResultsFromFunctionParameters(array, array)
#8 /var/www/html/wiki_1.32.0_SMW_3.1.0/extensions/SemanticMediaWiki/src/ParserFunctions/ShowParserFunction.php(45): SMW\ParserFunctions\AskParserFunction->parse(array)
#9 /var/www/html/wiki_1.32.0_SMW_3.1.0/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(428): SMW\ParserFunctions\ShowParserFunction->parse(array)
#10 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/parser/Parser.php(3493): SMW\ParserFunctionFactory->SMW\{closure}(Parser, string, string)
#11 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/parser/Parser.php(3200): Parser->callParserFunction(PPFrame_DOM, string, array)
#12 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/parser/Preprocessor_DOM.php(1279): Parser->braceSubstitution(array, PPFrame_DOM)
#13 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/parser/Parser.php(3014): PPFrame_DOM->expand(DOMElement, integer)
#14 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/parser/Parser.php(1350): Parser->replaceVariables(string)
#15 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/parser/Parser.php(476): Parser->internalParse(string)
#16 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/content/WikitextContent.php(341): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)
#17 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/content/AbstractContent.php(517): WikitextContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)
#18 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/Revision/RenderedRevision.php(242): AbstractContent->getParserOutput(Title, NULL, ParserOptions, boolean)
#19 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/Revision/RenderedRevision.php(211): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#20 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/Revision/RevisionRenderer.php(175): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string)
#21 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/Revision/RevisionRenderer.php(128): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#22 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#23 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/Revision/RenderedRevision.php(175): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#24 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/Storage/DerivedPageDataUpdater.php(1265): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#25 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/Storage/PageUpdater.php(707): MediaWiki\Storage\DerivedPageDataUpdater->getCanonicalParserOutput()
#26 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/page/WikiPage.php(1887): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#27 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/EditPage.php(2285): WikiPage->doEditContent(WikitextContent, CommentStoreComment, integer, boolean, User, string, array, integer)
#28 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/EditPage.php(1574): EditPage->internalAttemptSave(array, boolean)
#29 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/EditPage.php(677): EditPage->attemptSave(array)
#30 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/actions/EditAction.php(60): EditPage->edit()
#31 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/actions/SubmitAction.php(38): EditAction->show()
#32 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/MediaWiki.php(501): SubmitAction->show()
#33 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#34 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/MediaWiki.php(860): MediaWiki->performRequest()
#35 /var/www/html/wiki_1.32.0_SMW_3.1.0/includes/MediaWiki.php(517): MediaWiki->main()
#36 /var/www/html/wiki_1.32.0_SMW_3.1.0/index.php(42): MediaWiki->run()
#37 {main}
Insert an inline query in a wiki page. The above stack trace was produced by
{{#ask: [[Berlin]] |?Population= |mainlabel=- }}
A similar output is produced by
{{#show: Berlin |?Population }}
Thanks for reporting. Apparently ParamProcessor dropped support for PHP 7.0 which is in turn causing the issue.
@JeroenDeDauw @mwjames We have to either drop support for PHP 7.0 for SMW 3.1.0 or make sure that a maximum of 1.3.x of ParamProcessior is being installed. I currently labeled this as a bug. In the meantime I lean towards dropping support for PHP 7.0 since Debian 10 will be released on 2019-07-06 which ships with PHP 7.2. I personally will not be able to use SMW 3.1 but that's the way it is I guess.
ParamProcessor 1.4 indeed dropped support for PHP 7.0, which means composer won't install it if you have PHP 7.0, and instead will use an older version.
@carlo66 did you downgrade your PHP after running composer install or did you copy the files from some computer that has PHP 7.1 or later?
@carlo66 did you downgrade your PHP after running composer install or did you copy the files from some computer that has PHP 7.1 or later?
The latter is correct. I ran composer on another machine with PHP 7.2 and then copied everything back (the computer where the wiki is running is behind a firewall with very strict policies). Thanks for pointing out my mistake.
Thanks a lot @carlo66 for clarifying. I guess we learned something here. I extended the docu by a respective note to avoid others loosing time here.
Also noted in the README of the script for creating individual file releases.
The place where you create the file release can have older PHP. It can even have newer PHP if you put the target machines PHP version in composer.php
@JeroenDeDauw Thanks for the tip
Most helpful comment
The place where you create the file release can have older PHP. It can even have newer PHP if you put the target machines PHP version in composer.php