OpenClinica / enketo-oc

OpenClinica's fork of the Enketo web forms monorepo
Apache License 2.0
0 stars 1 forks source link

PDF endpoint missing values in item history when viewed in non-english locale #58

Open malcjackson opened 1 year ago

malcjackson commented 1 year ago

Describe the bug A form PDF generated via the PDF endpoint show's a null value for the item name when the PDF is printed in a non-English locale.

To Reproduce Create a form PDF in a non-English locale by passing in the language query parameter value for a supported non-english language including history. View item history. See item name field is empty.

Expected behavior The item name field should contain the item name.

missing

MartijnR commented 1 year ago

pdf with query history:

curl --user enketorules: -d "server_url=http://localhost:3000&form_id=language.test&ecid=a&lang=de&instance=\
<data xmlns:OpenClinica=\"http://openclinica.com/odm\" xmlns:enk=\"http://enketo.org/xforms\" xmlns:jr=\"http://openrosa.org/javarosa\" xmlns:oc=\"http://openclinica.org/xforms\" xmlns:orx=\"http://openrosa.org/xforms\" id=\"language.test\" version=\"1\">\
<page1><locale_note/><yn1/><locale_note_comment oc:queryParent=\"locale_note\"/><yn1_comment oc:queryParent=\"yn1\">{\"queries\":[{\"type\":\"comment\",\"id\":\"1\",\"date_time\":\"2023-01-18 11:34:36.608 -05:00\",\"comment\":\"df\",\"status\":\"new\",\"assigned_to\":\"\",\"notify\":false,\"thread_id\":\"50b52cae-6c5b-4d1a-ab70-3e05b31e3784\"}]}</yn1_comment></page1>\
<meta><instanceID>uuid:e1623dbf-bf87-4b2a-8a5a-85ae832f31f3</instanceID></meta></data>\
&instance_id=123" http://localhost:8005/oc/api/v1/instance/view/pdf > ~/Downloads/lang-test.pdf

But I cannot reproduce it with the above command, so something must be different.

Screenshot 2023-01-18 at 11 42 55 AM

@malcjackson, can you share your XForm please?

MartijnR commented 1 year ago

@malcjackson just a reminder to send a form (unless you can reproduce the issue with the form you sent for OpenClinica/enketo-oc#57 )

malcjackson commented 1 year ago

PDFnohistory.txt

Sorry for the delay @MartijnR , here is the xform of the form this was occurring in.