OpenClinica / enketo-express-oc

A fork of Enketo Smart Paper for OpenClinica
Apache License 2.0
5 stars 23 forks source link

IE11/Edge Legacy regression - no forms open #388

Closed pbowen-oc closed 3 years ago

pbowen-oc commented 4 years ago

With the current build, no forms open in IE11 or Edge Legacy. IE11 test.xml.txt

IE11 error: Screenshot 2020-10-19 124644

Edge Legacy error (from a different form): Edge-Win10-2018-10-22 2020-10-19 10-10-49

MartijnR commented 4 years ago

Not yet able to reproduce but I do note an error in the XForm (this is probably not the cause though):

<instance id="_users" src="jr://file-csv/users.xml" />

The src attribute should be either "jr://file-csv/users.csv" or (preferred) "jr://file/users.xml".

EE: http://localhost:8005/dOgQLe3K EE-oc: http://localhost:8005/single/fs/i/dOgQLe3K?ecid=1

pbowen-oc commented 4 years ago

I found an XForm from mid-2019 that contains the following:

<instance id="_users" src="jr://file-csv/users.xml"/>

There is now a space before the last slash that wasn't there in this previous example, but that is the only difference I see.

MartijnR commented 4 years ago

Yes, this has been done incorrectly for a long time in OC. It's not the cause of the issue though.

MartijnR commented 4 years ago

Guidance to work on this:

pbowen-oc commented 3 years ago

The fix seems to work for Edge Legacy but not IE11.

theywa commented 3 years ago

Hi @MartijnR, I tried running XForm from Paul's XML using enketo-express-oc preview like this " https://dewa.ngrok.io/preview?form=https%3A//dewa.ngrok.io/external-users.xml " on IE 11 and manually set the external instance on form-model.js but can't reproduce the error. Also tried using enketo-express but it can't loaded since IE11 belong to an outdated browser. Is that the correct way to run the XForm on enketo-express that you mention on guidance?

MartijnR commented 3 years ago

Hi @theywa,

I must have forgotten to send my earlier response to your question. Sorry about that!

Run grunt develop-ie11 to run enketo-express-oc. You're right, it won't work in enketo-express.

I'm not sure about your preview method, because of how the instance is "set". The error may be circumvented in the method you used.

theywa commented 3 years ago

@MartijnR, yes I'm using that command to run enketo-express-oc. Is that another way to run that XML with an external file? I'm not sure how to create a form with an external file using https://kc.kobotoolbox.org that when downloaded will result in the XML similar to the one Paul used above.

MartijnR commented 3 years ago

Hi @theywa, one way is to create a form with a pulldata() expression. See xlsform.org.

But you could also first try:

(There are a bunch more forms with external files listed here. Search for "external")

theywa commented 3 years ago

Hi @MartijnR, thanks for the forms, I can reproduce the issue using that form, at first, it looks like this error then after update the code, the external file loaded normally edge ie11

pbowen-oc commented 3 years ago

@theywa - I'm seeing different errors for my forms in IE11: Screenshot 2021-01-07 092935

And this was reported in Edge Legacy: Legacy Edge

theywa commented 3 years ago

@MartijnR ~ is it okay to add a polyfill script to make CSS.escape works on IE11?