Last modified: 2014-02-13 01:15:52 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 T44850, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42850 - Text area insertion after clicking "reply" link in Bugzilla has weird line wrapping
Text area insertion after clicking "reply" link in Bugzilla has weird line wr...
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Bugzilla (Other open bugs)
wmf-deployment
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 49597
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-08 03:34 UTC by MZMcBride
Modified: 2014-02-13 01:15 UTC (History)
4 users (show)

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


Attachments

Description MZMcBride 2012-12-08 03:34:26 UTC
Following the recent Bugzilla upgrade, sometimes when you click "reply" in Bugzilla, it inserts the text into the text area with quote markers (">") as expected, but it sometimes wraps the lines strangely (with one or two words on their own line inexplicably). I'm not sure why. I guess there were changes to Bugzilla's comments.js or something?

You can see an example of the strange line wrapping at bug 42734 comment 4.
Comment 1 Richard Guk 2012-12-10 02:38:13 UTC
Clicking "reply" no longer works for me at all (on Chrome/Linux). The text area remains completely empty.

Expected result would be to insert "(In reply to comment #..." and the ">" quoted text in the Additional Comments box.

JavaScript reports Uncaught ReferenceError: wrapReplyText is not defined in replyToComment().
Comment 2 Andre Klapper 2012-12-10 08:13:28 UTC
Might be a side-effect of https://bugzilla.mozilla.org/show_bug.cgi?id=551468 . Related issues are 810801,524915.

Richard: Different problem, see bug 42763: Check your cache.
Comment 3 Andre Klapper 2013-06-26 17:45:09 UTC
It seems to break lines weirdly whenever a line has 74 or 75 "real" characters (means: 76 or 77 with the preceding "> ").

Bugzilla/Constants.pm defines
    use constant COMMENT_COLS => 80;
    // This is -3 to account for "\n> "
    var maxCol = BUGZILLA.constant.COMMENT_COLS - 3;

https://bug551468.bugzilla.mozilla.org/attachment.cgi?id=486205 might be handy to have related code "in a nutshell".
Comment 4 Andre Klapper 2013-10-02 17:54:51 UTC
Happens only with 78 characters in a line of unquoted text.

I cannot reproduce on boogs.wmflabs.org nor my local Bugzilla instance.

So I downloaded the HTML of https://bugzilla.wikimedia.org/show_bug.cgi?id=42850 to my local harddisk as comment 0 also triggers the problem.
I can reproduce the problem locally in my browser (no Bugzilla involved) so I started to wonder if the wrapping which is done by Perl in order to display comments in HTML has an issue (comments are stored non-wrapped in the database. For displaying wrap_comment() in Bugzilla/Util.pm uses Perl's $Text::Wrap::).

boogs.wmflabs.org:               Perl 5.14.2-6ubuntu2.3    (Ubuntu Lucid)
bugzilla.wikimedia.org / kaulen: Perl 5.10.1-8ubuntu2.3    (Ubuntu Precise)
My local Bugzilla:               Perl 5.16.3-265.fc19.i686 (Fedora 19)

Not sure if this was really the best use of the last two hours, but at least interesting. 
So the problem might go away when updating the distribution on kaulen (bugzilla.wikimedia.org's server) / moving bugzilla.wikimedia.org onto a different machine which runs a newer distribution. 
Or not, if I was wrong.
Comment 5 Andre Klapper 2014-01-15 19:52:13 UTC
This problem will automatically be fixed once we have moved to the new server which runs a newer distro and Bugzilla 4.4 (I just tested it there).
Comment 6 Andre Klapper 2014-02-13 01:15:52 UTC
Fixed by moving to a new server with more recent distro. Probably the newer Perl in the stack.

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


Navigation
Links