Page MenuHomePhabricator

line breaks no longer work with text properties
Closed, DeclinedPublic

Description

Line breaks don't work in some situations when querying test properties. I tried three cases. The starting point is two pages (Test1 and Test2) with a text property 'Description'. The descriptions on Test1 and Test2 are:

This is the first test page
*Trying a bulleted list
*With three bullets
*asdf asdf asdf

and:

This is the second test page
#Trying a numbered list
#With only two lines

With a plain 'ask':
{{#ask:[[Category:Test]]

?Description

}}

the result is as expected: A table with two columns and two rows. The descriptions have line breaks, bullets and numbers as expected.

With an ask aimed at only showing the descriptions:
{{#ask:[[Category:Test]]

mainlabel=-
?Description=

}}

the result is not as expected. Both descriptions appear in one line separated by a ','.:

This is the first test page *Trying a bulleted list *With three bullets *asdf asdf asdf , This is the second test page #Trying a numbered list #With only two lines

With a 'show':
{{#show:Test1

?Description

}}

the result is also not as expected:
This is the first test page *Trying a bulleted list *With three bullets *asdf asdf asdf

Versions used:
MW 1.20.3
SMW 1.8.0.4


Version: unspecified
Severity: major

Details

Reference
bz48056

Event Timeline

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

There is a workaround: it seems that there is no problem if the text is showed in a template.

So:
{{#ask:[[Category:Test]]

?Description
format=template
template=Show description

}}

and the only thing this template does is show the description ({{{2|}}}) the result is fine.

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.