WFPVAM / GRASPDesigner

The source code repository for GRASP Desktop application
1 stars 1 forks source link

Imported form doesn't load on tablet due to malformed XML #1

Open jliew opened 8 years ago

jliew commented 8 years ago

Here are the steps to reproduce, and what does/doesn't work:

  1. We created a form on a test GRASP server.
  2. Published, synchronised to tablet; it opens.
  3. Export this form, and import to our production GRASP server.
  4. Publish, synchronise to tablet; it doesn't open on the tablet.

I'm attaching the exported file from step 3 above - it's in the zip file below. If you import it and publish it, the resulting copy of the form in XML on the tablet will have malformed XML near the bottom - search for the text ''Cash'. This won't open on the tablet.

Our workaround was to add a step 3.5 (between 3 and 4) - after importing, open the form in the designer for editing. You can see that in one of the dropdown lists that the selected value is incorrect (sorry I don't remember the details). However once you select the proper value and save the form, that will allow the form to be properly published.

Anyway you can reproduce by importing the attached form and publishing - it won't open on tablet.

PDM in-camp_ENG_062016.zip

GeoMmm commented 8 years ago

There is a known issue that sometimes on importing a form a list is dropped. Where this list is used in a field, another one is adopted. This may ruin some visibility conditions on dependent fields. Is this the problem? Otherwise we are using GRASP extensively and have never run into this issue.

btw the workaround to above problem is that when you import a form, run through it and check the lists assigned. It helps if the lists are given a useful name to facilitate this check.

jliew commented 8 years ago

Yes, that workaround is what worked for us - although we came about it a roundabout way :) Our issue is similar: after importing, it looks as if a list item has been dropped and another has been selected, but it isn't actually another list item... it's a malformed version of the correct list item. Re-selecting the correct list item from the dropdown list fixes the problem.

I narrowed it down to a piece of XML that gets mistreated at the import stage. Here is an XML snippet from the exported form, which is correct:

`

`

And here is the same snippet, after importing:

`

`

That form field is dependent on the preceding question which contains the dropdown list, and you can see the text value has been shortened, ending up with an extra single quote which I think probably broke the XML parser on GRASPMobile. I would debug this in GRASPDesigner, but don't have time at the moment to setup that dev env...

GeoMmm commented 8 years ago

Great I will see if Claudia can look at this. Please contact me privately at george.muammar at wfp.org Thanks