Page MenuHomePhabricator

[SMW] 1.6 to 1.7 RC1 #ask and #show insert extra spaces after commas in properties
Closed, DeclinedPublic

Description

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.


Version: unspecified
Severity: normal

Details

Reference
bz33478
TitleReferenceAuthorSource BranchDest Branch
.gitlab-ci.yml: Run terraform plan before running helm-check.pyrepos/releng/gitlab-cloud-runner!363dancymain-Ide1d7e496520cd3855833cede11045801d73edbemain
Pass $ARGS to helm-check.py in .gitlab-ci.ymlrepos/releng/gitlab-cloud-runner!361dancymain-I75caf636ae02c9c3b62428b631b4f05ea6e9c55fmain
helm-check.py: Terraform refresh before collecting outputsrepos/releng/gitlab-cloud-runner!360dancymain-I08897ed57b5036edab0629642ba5952a9054ac64main
Rewrite helm-check in python and Improve handling of helm release status in scriptrepos/releng/gitlab-cloud-runner!359sandeepsmain-I9fdfc32376eb32d4e572328f9247be1628494c39main
Improve handling of helm release status in scriptrepos/releng/gitlab-cloud-runner!357sandeepsmain-Id6e3321224bbd55646da54906b09ff517bc43dbamain
update cluster version prefix to 1.29.repos/releng/gitlab-cloud-runner!347sandeepsmain-I33d916e34956a605583454c64f1ab747772cd5a4main
added function to check cluster exists and validateTerraformState function.repos/releng/gitlab-cloud-runner!342sandeepsmain-I8c5dd376f69a1fdc7d209b620ae16ab19442ee0amain
update output messagerepos/releng/gitlab-cloud-runner!340sandeepsmain-I97956b6e0a545e50c56858adae80c7f7330591bamain
set kubeconfig file permissions to restrict accessrepos/releng/gitlab-cloud-runner!339sandeepsmain-I538990edb491c83fa78b33b878e1ed0dd15ba588main
update base image reference to include helmrepos/releng/gitlab-cloud-runner!338sandeepsmain-Ife6f8bd550d890f24e950d3e1151f21439c14096main
updating gitlab terraform image reference to include helmrepos/releng/gitlab-cloud-runner!337sandeepsmain-I6528e3fdd1fc3080de75e40245dfed6c4a2af82cmain
adding invalid image reference in pvc cleaner for testing purposerepos/releng/gitlab-cloud-runner!336sandeepsmain-Ia6f07f7bcf7a190f190c844f8edf12ecfd7dbb47main
add helm installationrepos/releng/gitlab-terraform-images!11sandeepsuse-trusted-tagwmf/stable
add helm installationrepos/releng/gitlab-terraform-images!10sandeepsuse-trusted-tag-I0c8d7f8c5c6be031d2421edb4ae077c30cfa6f20use-trusted-tag
fix mismatch in kubeconfig output variable referencerepos/releng/gitlab-cloud-runner!332sandeepsmain-Id30d43bea400d2f04388e28a9b7f16266ae731a9main
add outputs for namespace and kubeconfig in cluster configuration, providing necessary data for cicd operations.repos/releng/gitlab-cloud-runner!331sandeepsmain-I087b382d284576c29fb7b9f96db2ac1d338e9463main
helm check script update and added kube_config variale in digital ocean output.tfrepos/releng/gitlab-cloud-runner!317sandeepsmain-I255d9f68a857455c8341b50de5a3d1b65451d3a3main
Show related patches Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:06 AM
bzimport set Reference to bz33478.
bzimport added a subscriber: Unknown Object (MLST).

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.

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

Aklapper subscribed.

The Semantic MediaWiki developers requested in https://phabricator.wikimedia.org/T64114 to move their task tracking to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues and to close remaining tasks in Wikimedia Phabricator. If you still face the problem reported in this task in a supported version of SMW, please feel free to transfer your report to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues . We are sorry for the inconvenience.