Thanks, fixed in r111237. The main file that needs update is
./includes/storage/SMW_SparqlStoreQueryEngine.php
Cheers,
Markus
On 02/02/12 13:58, Alex M. Hendler (public) wrote:
> Hello,
>
> On SMW 1.7.0 (using Semantic Bundle from 2012-01-09), MW 1.18.1, and
> 4store 1.1.4, if I execute the following query (for example):
>
> {{#ask: [[-Has address::+]]
> }}
>
> I get an error message like this:
>
> Unexpected non-MediaWiki exception encountered, of type "Exception"
> exception 'Exception' with message
> 'SMWExporter::getResourceElementForProperty() can only be used for
> user-defined properties.' in
> /var/web/common/elements/extensions/SemanticBundle-2012-01-09/SemanticMediaWiki/includes/export/SMW_Exporter.php:229
> Stack trace:
> #0
> /var/web/common/elements/extensions/SemanticBundle-2012-01-09/SemanticMediaWiki/includes/storage/SMW_SparqlStoreQueryEngine.php(704):
> SMWExporter::getResourceElementForProperty(Object(SMWDIProperty))
> #1
> /var/web/common/elements/extensions/SemanticBundle-2012-01-09/SemanticMediaWiki/includes/storage/SMW_SparqlStoreQueryEngine.php(489):
> SMWSparqlStoreQueryEngine->buildPropertyCondition(Object(SMWSomeProperty),
> 'result', NULL)
> #2
> /var/web/common/elements/extensions/SemanticBundle-2012-01-09/SemanticMediaWiki/includes/storage/SMW_SparqlStoreQueryEngine.php(471):
> SMWSparqlStoreQueryEngine->buildSparqlCondition(Object(SMWSomeProperty),
> 'result', NULL)
> #3
> /var/web/common/elements/extensions/SemanticBundle-2012-01-09/SemanticMediaWiki/includes/storage/SMW_SparqlStoreQueryEngine.php(316):
> SMWSparqlStoreQueryEngine->getSparqlCondition(Object(SMWSomeProperty))
> #4
> /var/web/common/elements/extensions/SemanticBundle-2012-01-09/SemanticMediaWiki/includes/storage/SMW_SparqlStore.php(288):
> SMWSparqlStoreQueryEngine->getInstanceQueryResult(Object(SMWQuery))
> #5
> /var/web/common/elements/extensions/SemanticBundle-2012-01-09/SemanticMediaWiki/includes/SMW_QueryProcessor.php(395):
> SMWSparqlStore->getQueryResult(Object(SMWQuery))
> #6
> /var/web/common/elements/extensions/SemanticBundle-2012-01-09/SemanticMediaWiki/includes/SMW_QueryProcessor.php(361):
> SMWQueryProcessor::getResultFromQuery(Object(SMWQuery), Array, Array,
> 2, 1, 'list')
> #7
> /var/web/common/elements/extensions/SemanticBundle-2012-01-09/SemanticMediaWiki/includes/SMW_QueryProcessor.php(339):
> SMWQueryProcessor::getResultFromQueryString('[[-Has address:...',
> Array, Array, 2, 1)
> #8
> /var/web/common/elements/extensions/SemanticBundle-2012-01-09/SemanticMediaWiki/includes/parserhooks/SMW_Ask.php(34):
> SMWQueryProcessor::getResultFromFunctionParams(Array, 2)
> #9 [internal function]: SMWAsk::render(Object(Parser), '[[-Has address:...')
> #10 /var/web/common/mediawiki-1.18.1/includes/parser/Parser.php(3067):
> call_user_func_array(Array, Array)
> #11
> /var/web/common/mediawiki-1.18.1/includes/parser/Preprocessor_DOM.php(1044):
> Parser->braceSubstitution(Array, Object(PPFrame_DOM))
> #12 /var/web/common/mediawiki-1.18.1/includes/parser/Parser.php(2861):
> PPFrame_DOM->expand(Object(PPNode_DOM), 0)
> #13 /var/web/common/mediawiki-1.18.1/includes/parser/Parser.php(1033):
> Parser->replaceVariables('{{Project|Prior...')
> #14 /var/web/common/mediawiki-1.18.1/includes/parser/Parser.php(340):
> Parser->internalParse('{{Project|Prior...')
> #15 [internal function]: Parser->parse('{{Project|Prior...',
> Object(Title), Object(ParserOptions))
> #16 /var/web/common/mediawiki-1.18.1/includes/StubObject.php(58):
> call_user_func_array(Array, Array)
> #17 /var/web/common/mediawiki-1.18.1/includes/StubObject.php(76):
> StubObject->_call('parse', Array)
> #18 [internal function]: StubObject->__call('parse', Array)
> #19 /var/web/common/mediawiki-1.18.1/includes/EditPage.php(2126):
> StubObject->parse('{{Project|Prior...', Object(Title),
> Object(ParserOptions))
> #20 /var/web/common/mediawiki-1.18.1/includes/EditPage.php(1387):
> EditPage->getPreviewText()
> #21 /var/web/common/mediawiki-1.18.1/includes/EditPage.php(500):
> EditPage->showEditForm()
> #22 /var/web/common/mediawiki-1.18.1/includes/EditPage.php(353):
> EditPage->edit()
> #23 /var/web/common/mediawiki-1.18.1/includes/Wiki.php(515):
> EditPage->submit()
> #24 /var/web/common/mediawiki-1.18.1/includes/Wiki.php(255):
> MediaWiki->performAction(Object(Article))
> #25 /var/web/common/mediawiki-1.18.1/includes/Wiki.php(640):
> MediaWiki->performRequest()
> #26 /var/web/common/mediawiki-1.18.1/includes/Wiki.php(547): MediaWiki->main()
> #27 /var/web/common/mediawiki-1.18.1/index.php(57): MediaWiki->run()
> #28 {main}
>
> #0
> /var/web/common/elements/extensions/SemanticBundle-2012-01-09/SemanticMediaWiki/includes/storage/SMW_SparqlStoreQueryEngine.php(704):
> SMWExporter::getResourceElementForProperty(Object(SMWDIProperty))
> #1
> /var/web/common/elements/extensions/SemanticBundle-2012-01-09/SemanticMediaWiki/includes/storage/SMW_SparqlStoreQueryEngine.php(489):
> SMWSparqlStoreQueryEngine->buildPropertyCondition(Object(SMWSomeProp