Old versions
Using short urls
I have Pageforms - query form That I have been using for some time. after upgrade, The SPARQL query works, however the links are bad know.
PREFIX property:<server.comProperty-3A>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX swivt:<http://semantic-mediawiki.org/swivt/1.0#>
SELECT ?supported_by ?Subcategory ?name ?version ?technology_name ?owner ?contact ?publication_date ?publication_status ?support_status ?manufacturer ?start_date ?end_date WHERE { ?s property:Has_technology ?name .
?s property:Has_parent_page ?parent.
?s property:Has_subobject ?subobject .
?subobject property:Has_Version ?version .
?subobject property:Technology_Name ?technology_name .
?subobject property:Has_Support_Status ?support_status .
?subobject property:Supported_By ?supported_by .
?subobject property:Has_Start_Date ?start_date .
...
}
No errors just bad links
To reproduce the issue, write a SPARQL Query with links on a wiki with short urls
I opened an issue on LinkedWiki talk
https://www.mediawiki.org/wiki/Extension_talk:LinkedWiki
Hi, I have no experience with SPARQL but I know that SMW 3.0.0 has altered SPARQL settings. See https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/3315 and https://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki_3.0.0#Breaking_changes_and_deprecations.
Also, visit Special:SemanticMediaWiki in your wiki to see other probably deprecations.
I have to say I'm having a hard time to understand the core issue of this ticket, so let me guess on what this is about.
I get: server.comClient_Firewall/TS-2DRoadmap
it should be: server.com/wiki/Client_Firewall/TS-Roadmap
It is about the URI scheme used as reference in your SPARQL queries which seem different from what you used to be and those that are used as resource references.
The documentation of enableSemantics [0] states of what to expect and what not to do. For example, using enableSemantics( 'example.org/wiki', false ); produces a SPARQL with something like http://example.org/wiki/mw-foo/....
PREFIX wiki: <http://example.org/wiki/mw-foo/index.php/Special:URIResolver/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX swivt: <http://semantic-mediawiki.org/swivt/1.0#>
PREFIX property: <http://example.org/wiki/mw-foo/index.php/Special:URIResolver/Property-3A>
while using enableSemantics( 'example.org/wiki/', true ); would generate a different URI scheme.
PREFIX wiki: <example.org/wiki/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX swivt: <http://semantic-mediawiki.org/swivt/1.0#>
PREFIX property: <example.org/wiki/Property-3A>
So, yes, it is important to understand the difference and how those settings change the underlying assumptions about URIs which is why [0] explicitly states "... It is strongly recommended to not change the setting of this function after the initial setup of the wiki ...".
PS: The way enableSemantics works or is used to set $smwg颅Namespace hasn't changed. The base URI is generated from [1].
[0] https://www.semantic-mediawiki.org/wiki/Help:EnableSemantics
[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/export/SMW_Exporter.php#L147-L190
Thanks mwjames
enableSemantics( 'example.org/wiki/', true ); fixed most of the issues
Most helpful comment
I have to say I'm having a hard time to understand the core issue of this ticket, so let me guess on what this is about.
It is about the URI scheme used as reference in your SPARQL queries which seem different from what you used to be and those that are used as resource references.
The documentation of
enableSemantics[0] states of what to expect and what not to do. For example, usingenableSemantics( 'example.org/wiki', false );produces a SPARQL with something likehttp://example.org/wiki/mw-foo/....while using
enableSemantics( 'example.org/wiki/', true );would generate a different URI scheme.So, yes, it is important to understand the difference and how those settings change the underlying assumptions about URIs which is why [0] explicitly states "... It is strongly recommended to not change the setting of this function after the initial setup of the wiki ...".
PS: The way
enableSemanticsworks or is used to set$smwg颅Namespacehasn't changed. The base URI is generated from [1].[0] https://www.semantic-mediawiki.org/wiki/Help:EnableSemantics
[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/export/SMW_Exporter.php#L147-L190