Last modified: 2013-03-16 22:31:49 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 T35478, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33478 - [SMW] 1.6 to 1.7 RC1 #ask and #show insert extra spaces after commas in properties
[SMW] 1.6 to 1.7 RC1 #ask and #show insert extra spaces after commas in prope...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-03 01:52 UTC by badon
Modified: 2013-03-16 22:31 UTC (History)
4 users (show)

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


Attachments

Description badon 2012-01-03 01:52:08 UTC
When there are multiple values for a single property, #ask and #show prints them in a comma delimited format, with 2 spaces after the comma. For multiple values entered into a Semantic Forms field separated by a comma and only 1 space, #ask and #show will insert a second space. 

If there are no spaces in the Semantic Forms field, then #ask and #show will insert one when displaying it. That is (probably) the expected behavior. The problem only occurs when there is already a space separating multiple values. Then, the display of the values differs from the actual text of the output values, and leads to difficult to diagnose problems.

This breaks comparisons between properties. I discovered this bug using the Arrays extension, which removes the extra whitespace, as does almost everything else in MediaWiki-land and HTML-land. That's probably why it took so long to discover this bug - you can't see it without knowing it's there and deliberately looking for it. The bug goes back to at least 1.6, which is as far as I tested.

I will post a link to a demo in a few minutes.
Comment 1 badon 2012-01-03 01:54:33 UTC
Login with Demo/test:

http://www.coincompendium.com/w/index.php/Sandbox/Bug_33478
Comment 2 badon 2012-02-08 03:23:53 UTC
I tested this again in SMW 1.7.0.2 and found that there are undocumented changes that cause different behavior of #ask. Producing the same output as #show as in the demo and bug report here seems to be no longer possible, as far as I know. The demo does not show the intended results anymore, since it was upgraded to 1.7+. You can read my notes on the differences here:

http://www.mediawiki.org/wiki/User:Badon#.23ask_multiple_property_comma_delimited_list_format

I'm not sure that was intentional (since it's undocumented), so I'll give it some thought and maybe report it as a blocker bug for this bug. Additionally, it is important to mention that fixing only this bug:

https://bugzilla.wikimedia.org/show_bug.cgi?id=32863

would have the effect of making this bug irrelevant, and also the bug I may report about the changed #ask behavior.
Comment 3 badon 2012-02-08 22:00:25 UTC
I updated the demo for this bug to accommodate undocumented breaking changes in SMW 1.7.x, as described here:

http://www.mediawiki.org/w/index.php?title=User:Badon&oldid=496431#.23ask_multiple_property_comma_delimited_list_format

It is possible to produce the same output as previous versions, as I have discovered, so a bug report will not be made. Most importantly, this bug report is still valid, with the same erroneous output still being produced in the updated demo (login with Demo/test):

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

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


Navigation
Links