Last modified: 2013-06-15 15:53:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33151, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31151 - Property values with a space in them do not work in ”not equal”-queries.
Property values with a space in them do not work in ”not equal”-queries.
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
master
All All
: Unprioritized normal with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-25 11:52 UTC by Leonard Wallentin
Modified: 2013-06-15 15:53 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Leonard Wallentin 2011-09-25 11:52:50 UTC
Property values with a space in them do not work in ”not equal”-queries in SMW 1.6. You can see the bug in action at Referata Scratchpad: [http://scratchpad.referata.com/w/index.php?title=User:Rotsee/test User:Rotsee/test]

<code>
MediaWiki	1.17.0 (r90588)
PHP	5.3.6 (apache2handler)
MySQL	5.0.92-community
</code>

Same result at my wiki [http://xn--ssongsmat-v2a.nu Säsongsmat.nu]:
<code>
MediaWiki	1.17.0
PHP	5.3.3-7+squeeze3 (apache2handler)
MySQL	5.1.56-1
</code>
Comment 1 Leonard Wallentin 2012-11-20 23:27:28 UTC
Also confirming this in MW1.20 / SMW1.8
Comment 2 Thibault Taillandier 2013-04-25 11:37:04 UTC
Hi,

I would like to confirm this bug. I encountered it also.

My versions :
- Semantic MediaWiki (version 1.8.0.4)
- MediaWiki	1.20.3
- PHP	5.3.3-7+squeeze14 (apache2handler)
- MySQL	5.1.61-0+squeeze1

I found a patch, here is how to apply it :

- open file : extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3_Queries.php (line 549)

Change this line : 
<code>
      case SMW_CMP_NEQ: $comp = '!='; break
</code>

by this one :
<code>
      case SMW_CMP_NEQ: $comp = '!='; $value =  str_replace( '_' , ' ' , $value ); break;
</code>

This patch works fine for me. I hope it will help others, but i did not test it anywhere else.
Comment 3 Dan Smith 2013-06-15 15:53:42 UTC
Same problem for me.  To clarify, "!" works for spaces in strings, but not spaces in page names.

Relevant output from the "debug" format:

t6.smw_sortkey!='A_Page_Name' (page comparison: broken, as sortkey doesn't use underscores)
t3.o_hash!='Some text' (string comparison: this is correct)

I'm using SMW 1.8.0.4, MediaWiki 1.20.3.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links