Newlines in wsparql query argument seems to break the function

18 views
Skip to first unread message

Robert Syme

unread,
May 9, 2012, 3:22:52 AM5/9/12
to linke...@googlegroups.com
Hi all.

Whenever I have a newline in the wsparql query argument, I get the error message 

Error #sparql : Argument incorrect (usage : #wsparql:namewidget|query=SELECT * WHERE {?a ?b ?c .} )

For example, this will work:

{{#wsparql: Testwidget
|query= SELECT * WHERE { ?s ?p ?o .} LIMIT 5

But this will break:

{{#wsparql: Testwidget
|query= SELECT * WHERE { ?s ?p ?o .} 
LIMIT 5

I've got a video example up at http://youtu.be/BvM4Tmc24kc that illustrates the problem.

Thanks!

Karima Rafes

unread,
May 9, 2012, 3:35:23 AM5/9/12
to linke...@googlegroups.com

Hi

Thanks,
I will see that tomorrow.

Bye
Karima

Robert Syme

unread,
May 9, 2012, 3:39:53 AM5/9/12
to linke...@googlegroups.com
Cool. I forgot to add that I'm running:

PHP 5.3.10-1ubuntu3
ParserFunctions Version 1.4.0
Mediawiki 1.18.2
Semantic Mediawiki Version 1.7.1
LinkedWiki Version 2.0.0 alpha 1

Karima

unread,
May 10, 2012, 5:59:51 AM5/10/12
to LinkedWiki
Ok I found.

You can test :

Replace
#^([^= ]+)=(.*)$#i
by
#^([^= ]+)=((.|\n)*)$#i

in the file LinkedWiki.php in the extension

If this ok for you, I will push this FIX this night.

Thanks
Bye
Karima

Rob Syme

unread,
May 11, 2012, 1:40:48 AM5/11/12
to linke...@googlegroups.com
Superstar! Works like a charm.

Merci beucoup.
-r

Karima Rafes

unread,
May 11, 2012, 10:01:13 AM5/11/12
to linke...@googlegroups.com
Great ;)
Bye
Karima

2012/5/11 Rob Syme <rob....@gmail.com>
Reply all
Reply to author
Forward
0 new messages