SPARK and MediaWiki 1.17

15 views
Skip to first unread message

Benedikt Kämpgen

unread,
Aug 29, 2011, 8:55:37 AM8/29/11
to rdf-...@googlegroups.com, Jeroen De Dauw
Hello.

In MediaWiki 1.17 (the last stable release of MW) SPARK extension does not
work for me.

I found out that apparently in Spark.class.php the line

"return array( $parser->insertStripItem( $html, $parser->mStripState ),
'noparse' => true, 'isHTML' => true );"

replaces ? after an empty space by a non-breaking space ( ), which
breaks the SPARQL query. Apparently, it is not a bug. In 1.18 this does not
seem to happen. How about inserting a line which removes all spaces before
?. This would still make the SPARQL queries work, for MW 1.17 and 1.18 (I
have tested it).

Regards,

Benedikt


--
AIFB, Karlsruhe Institute of Technology (KIT)
Phone: +49 721 608-47946
Email: benedikt...@kit.edu
Web: http://www.aifb.kit.edu/web/Hauptseite/en

Jeroen De Dauw

unread,
Aug 29, 2011, 11:07:02 AM8/29/11
to rdf-...@googlegroups.com
Hey Benedikt,

I just added you change: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/95665

However I cannot get Spark to work locally any more, either on MW trunk or 1.17. This has nothing to do with this change as it didn't work before either. I'm not sure what the problem is - it used to work. The SPARQL request is failing with a 500 error, but that's all the info I'm getting. This is my spark tag: http://pastebin.com/XE2qCFqG Until someone tells me how to get this to work I can not further dev the MediaWiki Spark extension.

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil.
--

Benedikt Kämpgen

unread,
Aug 30, 2011, 3:26:56 AM8/30/11
to rdf-...@googlegroups.com
Jeroen,

Thanks for this.

You could use Firebug to have an execution stopped at jquery.spark.js line
83 (running "format($this, response, reducer(response), settings);".

There, you copy the value of this->url into the browser and check the error
message.

In your query, I am not sure whether you need a "from"-clause (e.g., from
<http://smartdbwrap.appspot.com/data/analysisobject/ds>) and a
data-spark-endpoint (e.g., data-spark-endpoint="http://qcrumb.com/sparql",
but qcrumb seems to be broken at the moment) to make it work.

Best,

Benedikt

PS: By now, I have commit access, so next time I can commit the changes
also, if you want.


--
AIFB, Karlsruhe Institute of Technology (KIT)
Phone: +49 721 608-47946
Email: benedikt...@kit.edu
Web: http://www.aifb.kit.edu/web/Hauptseite/en

Reply all
Reply to author
Forward
0 new messages