If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Bugzilla caught exception when retrieving comment in other locales

RESOLVED WONTFIX

Status

Webtools
BzAPI
RESOLVED WONTFIX
6 years ago
3 years ago

People

(Reporter: teapot, Assigned: gerv)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2

Steps to reproduce:

Install and run bugzilla4.2rc2 and BzAPI 1.0;
Create a bug, add comments in Chinese;
On a browser, try to access comment field of a bug(say bug id=1):
http://host:port/bug/1/comment?username=abbcdef&password=XXXXXX


Actual results:

The response displayed: Please come back later in serverl language.
The BzAPI log file showed:
Feb 09 15:18:34 [INFO] http://host:port/bug/1/comment?username=abcdef&password=XXXX | {"password":"XXXX","username":"abcdef"} => Bug.comments: {"Bugzilla_password":"XXXX","ids":["1"],"Bugzilla_login":"abcdef","new_since":null}
Feb 09 15:18:40 [ERROR] Caught exception in Bugzilla::API::Controller::Bug->comment "Can't use string ("
unclosed token at line 1, colum"...) as a HASH ref while "strict refs" in use at C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\BzAPI\lib/Bugzilla/API/Model/Utils.pm line 684, <> line 2."
 


Expected results:

It should show value, author and creation time in comments field.

Updated

6 years ago
Assignee: general → gerv
Component: Bugzilla-General → BzAPI
Product: Bugzilla → Webtools
QA Contact: default-qa → bzapi
Version: 4.2 → 1.0
(Assignee)

Comment 1

6 years ago
WFM locally with sample small section of Chinese text. Are you able to give the exact contents of the comment?

Bugzilla gets this data from the XML output of the bug concerned. Can you view the bug directly, click the "XML" link, and then run the result through a validator to make sure Bugzilla is generating valid XML?

Thanks,

Gerv
(Assignee)

Updated

6 years ago
Summary: Bubzilla caught exception when retrieving comment in other locales → Bugzilla caught exception when retrieving comment in other locales
(Reporter)

Comment 2

6 years ago
This the Chinese text:
北京出现大风降温天气

I can see this displayed via web interface. This is related part for that comment in XML display(I have masked name part):
...
<long_desc isprivate="0">
<commentid>10</commentid>
<who name="ABCDEF">ABCDEF</who>
<bug_when>2012-02-06 15:26:43 -0800</bug_when>
<thetext>北京出现大风降温天气</thetext>
</long_desc>
...

Putting the whole XML output to http://www.w3schools.com/xml/xml_validator.asp and   clicked validate button, it displayed "No errors found".
(Assignee)

Comment 3

6 years ago
There's no exception getting the comment you just added via our BzAPI server:
https://api-dev.bugzilla.mozilla.org/latest/bug/725849?include_fields=_all

However, the text is charset-mangled, whereas it isn't on my test server. <sigh> Maybe there's an old Perl module somewhere which isn't converting things right.

I'm afraid I don't have time to dig in and debug this right now :-|

Gerv
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 4

3 years ago
BzAPI is very much in maintenance mode and is being superseded by the BzAPI shim on top of the native Bugzilla REST API, and that native API itself. So this bug is not going to be fixed.

Gerv
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.