Discussion:
[Bug 32955] New: Property type "URL" cannot be queried by property when the URL contains equal sign character "="
b***@wikimedia.org
2011-12-10 21:44:40 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

Web browser: ---
Bug #: 32955
Summary: Property type "URL" cannot be queried by property when
the URL contains equal sign character "="
Product: MediaWiki extensions
Version: any
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Semantic MediaWiki
AssignedTo: wikibugs-***@lists.wikimedia.org
ReportedBy: ***@gmail.com
CC: ***@yahoo.com, ***@semantic-mediawiki.org
Classification: Unclassified


Type URL can:

Define a property:

* [[URL::https://www.google.com/search?q=semantic+mediawiki]]

Be queried for the property:

* {{#show: Some page | ?URL}}
* {{#ask: [[Some page]] | ?URL}}

But cannot be queried by property if the URL has an equals sign in it:

* {{#ask: [[URL::https://www.google.com/search?q=semantic+mediawiki]] | ? |
?URL}}
* {{#ask: [[URL::=]] | ? | ?URL | link=none}}

It will produce the incorrect error "Some subquery has no valid condition.".

This was tested in SMW 1.6. I'm not sure if this bug still exists in current
development versions (I can't use SMW 1.6.1 because image queries do not work
well).
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2012-01-09 05:27:25 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

badon <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical

--- Comment #1 from badon <***@gmail.com> 2012-01-09 05:27:25 UTC ---
This bug has gotten worse in SMW 1.7, and will now cause the page to fail to
display completely. I have made a demo here (login with Demo/test):

http://www.coincompendium.com/w/index.php/Sandbox/Bug_32955

I have also increased this to "critical", since it disrupts the page display
now, instead of merely producing erroneous queries.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2012-01-09 05:30:43 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

badon <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Summary|Property type "URL" cannot |[SMW] 1.6 to 1.7 property
|be queried by property when |type "URL" cannot be
|the URL contains equal sign |queried by property when
|character "=" |the URL contains equal sign
| |character "="

--- Comment #2 from badon <***@gmail.com> 2012-01-09 05:30:43 UTC ---
I also updated the demo to be compatible with the breaking changes in the query
format done in 1.7:

http://wikimedia.7.n6.nabble.com/Semantic-Result-Formats-1-7-released-tp2799845p3504612.html
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2012-02-08 02:39:37 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

--- Comment #3 from badon <***@gmail.com> 2012-02-08 02:39:37 UTC ---
I tested this in SMW 1.7.0.2 and the bug demo still works the same as in 1.7.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2012-02-09 06:13:36 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

badon <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://bugzilla.wikimedia.
| |org/show_bug.cgi?id=34044
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2012-02-18 06:05:40 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

--- Comment #4 from badon <***@gmail.com> 2012-02-18 06:05:40 UTC ---
I tried to work around this problem with type Text, but it seems text cannot be
queried by property:

http://semantic-mediawiki.org/wiki/Help:Type_Text

I also tried type String, but that is limited to only 255 characters. Many URLs
are often much longer.

It appears the only workaround is to break up URLs into pieces and query for
each piece. That will take a lot of semantic data overhead and substantial
amounts of code, and I have decided not to do it.

I will keep thinking to see if I can come up with a workaround until this is
fixed. I just tested SMW 1.7.1 Beta/RC1 and discovered this bug has not been
fixed in the upcoming release.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2012-02-18 06:34:05 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

--- Comment #5 from badon <***@gmail.com> 2012-02-18 06:34:05 UTC ---
It looks like in 1.7.x it is the page layout that is broken. I'm not sure how
that happened.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2012-02-19 11:18:25 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

--- Comment #6 from Markus Krötzsch <***@semantic-mediawiki.org> 2012-02-19 11:18:25 UTC ---
(In reply to comment #4)
Post by b***@wikimedia.org
I tried to work around this problem with type Text, but it seems text cannot be
http://semantic-mediawiki.org/wiki/Help:Type_Text
I also tried type String, but that is limited to only 255 characters. Many URLs
are often much longer.
This will be an independent problem for you then. The SMW database backend can
only store 255 characters for any data value that is not Text or Code. String
reports a problem, but URL has the same limitation (and may not report it).
This is independent from this bug, but gave me an idea on how to improve the
handling of long strings in general; I filed this as bug 34511.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2012-02-19 20:37:11 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

--- Comment #7 from badon <***@gmail.com> 2012-02-19 20:37:11 UTC ---
Thanks for catching and reporting that issue for me, I was not aware of it yet.

Is bug 34511 a blocker for this bug? I don't think it is, since this bug is
only about one problematic "=" character. But, even if that is fixed, correct
behavior won't be reliable until bug 34511 is fixed. And, maybe the
implementation details of how bug 34511 is fixed will affect how this one is
fixed.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2012-02-20 14:07:10 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

Markus Krötzsch <***@semantic-mediawiki.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Priority|Unprioritized |Normal
Severity|critical |normal

--- Comment #8 from Markus Krötzsch <***@semantic-mediawiki.org> 2012-02-20 14:07:10 UTC ---
Bug 34511 is not related to this bug. They are completely independent. The bug
reported here is related to parsing input of the #ask function; bug 34511 is
related to the database API. They should not affect each other at all.

The problem in the given bug is that "=" is a special character in #ask for
denoting parameter values. There needs to be some mechanism to prevent SMW
mistaking your input for a parameter assignment.

I do not know how and why #ask queries with this behaviour have a negative
effect on your page layout, but if they do then this should not be related to
the problem with =. Probably similar layout problems occur for all queries, or
for all queries that have some error messages. The = bug in turn should occur
for all data values that include =, not just for URLs. I will update the title
accordingly.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2012-02-20 14:08:31 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

Markus Krötzsch <***@semantic-mediawiki.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Summary|[SMW] 1.6 to 1.7 property |#ask query parsing fails
|type "URL" cannot be |when = character occurs in
|queried by property when |query string
|the URL contains equal sign |
|character "=" |
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2012-02-20 19:07:14 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

--- Comment #9 from badon <***@gmail.com> 2012-02-20 19:07:14 UTC ---
Actually, yes, I have noticed layout problems in other queries. But, I had
thought it was a problem with my code, not in SMW. Now that I know that it may
be a valid bug in SMW, I'll test the cases I have where I'm experiencing it to
see if I can isolate a demo for a bug report.

Once again, thanks for so generously sharing your insights. It is much
appreciated, and very helpful for me in my bug testing efforts. I wish everyone
were so considerate as you are.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2012-04-30 13:16:48 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

Markus Krötzsch <***@semantic-mediawiki.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@thingelstad.com

--- Comment #10 from Markus Krötzsch <***@semantic-mediawiki.org> 2012-04-30 13:16:48 UTC ---
*** Bug 36351 has been marked as a duplicate of this bug. ***
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2014-11-20 21:07:37 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

[[kgh]] <***@kghoffmeyer.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |***@kghoffmeyer.de
Resolution|--- |FIXED

--- Comment #11 from [[kgh]] <***@kghoffmeyer.de> ---
Fixed with pull request 640 [1]. Thus closing as RESOLVED FIXED.

[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/640
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2014-11-20 21:48:32 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=32955

badon <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://bugzilla.wikimedia.
| |org/show_bug.cgi?id=34511
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Loading...