Last modified: 2013-06-15 15:53:42 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>
Also confirming this in MW1.20 / SMW1.8
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.
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.