Page MenuHomePhabricator

Html presentation different between found results and error msg
Open, LowPublic

Description

Author: wmf.amgine3691

Description:
Html output of method=none has a leading <br />, while the output of the 'Error:No results!' does not.

Example:

http://wiki.occupy.net/index.php?title=OccupyNet:Sandbox&diff=prev&oldid=7745
http://wiki.occupy.net/index.php?title=OccupyNet:Sandbox&diff=prev&oldid=7746


Version: unspecified
Severity: minor

Details

Reference
bz35703

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:10 AM
bzimport set Reference to bz35703.
bzimport added a subscriber: Unknown Object (MLST).

wmf.amgine3691 wrote:

(may not be a dpl bug, but meh.)

That's kind of odd. I think we should get rid of the leading <br/> rather than adding one to the error message.

Check to see if you remove the newline between the <td> and the <dynamicpagelist> if that kills the br. (Could just be the double newline in a row causes parser to insert br. Should perhaps still do something about that, but less of an issue if there is such an easy work around)

(As an aside, those error messages are customizable, so you could add a br manually if you need to)

wmf.amgine3691 wrote:

(In reply to comment #2)

That's kind of odd. I think we should get rid of the leading <br/> rather than
adding one to the error message.

Check to see if you remove the newline between the <td> and the
<dynamicpagelist> if that kills the br. (Could just be the double newline in a
row causes parser to insert br. Should perhaps still do something about that,
but less of an issue if there is such an easy work around)

(As an aside, those error messages are customizable, so you could add a br
manually if you need to)

Yep, removing the newline kills the br. Still weird, but not the extension's behavior?

Yah, I knew the error message was customizable. Too lazy.

but not the extension's
behavior?

Sort of the extensions fault. What happens is: method=none triggers $startList = '';. Later on we have $output = $startList . "\n";. If there is a newline preceeding the dpl, that results in two new lines in a row. Parser sees two newlines in a row, and interprets it as a <br/>. Extension could be changed to not output that newline at begining and behaviour would go away (or it could be changed to disable that part of parsing on its output and the issue would go away, but that might have unintended consequences)