Enketo skip patterns working only on refreshing page

Hi guys, I am using odk aggregate 1.4. I have forms uploaded and the forms and the skip logic work well in odk for android device. I have enketo installed as well, my forms load well on enketo, but the skip patterns dont work until the page is refreshed and I select load record on the dialog box that pops up. Is there a setting that should be set so the skip logic work on actions by user such as change events?

1 Like

For Enketo questions, you might have better luck emailing support@enketo.org.



(I asked user for form to reproduce the issue).

Another option to report issues is this forum: https://groups.google.com/forum/#!forum/enketo-users

1 Like

Thanks, I have sent the file, please try it out and let me know @martijnr sorry for this other lazy question but only that I am new to enketo and node js. Is there a place to read the log files of the enketo app, to help with trouble shooting? Thanks!

Hi @yanokwa I have been trying to trouble shoot the issue with my form's skips not working with enketo, I am now guessing the converter I am using may be the problem. I have been using the odk xls converter from this link http://opendatakit.org/xiframe/ and the files I did convert used to work well with enketo until upto about 3 weeks ago. On conversion, when I click preview in enketo, the skips work well. The problem, however, comes when I upload the xml I have downloaded by clicking the download button to my aggregate server and use enketo (version 1.35.3) to view the form. Then the skip logics only work once the page has been refreshed. I know the version of enketo used in your preview button click may be much higher (1.65.1). I did send to a friend the same xls form, he converted the form, I gues with an earlier version of ODK XLSForm Offline and uploaded to the same server and the skips work fine from his upload. I then decided to download ODK XLSForm Offline v1.6.0 from the link here and tried the conversion and upload, but my form's skips broke again. I also noticed from the git hub link that the application was last updated 19 days ago from today, approximately the same time my form's skips stopped working until the enketo page is refreshed. Could it be the update causing this as these events coincidentally happened at the same time? Could it be that there is a backward compatibility issue with earlier versions of enketo? Sorry for the long narrative but I did not know how to make this shorter. Thanks for reading this far, please reach out if any of my statements is not clear enough. Thanks.

Just an update on this, I have been able to use XLS Form Offline version 1.4 to convert my forms, the enketo forms work well. The skip logics work without having to refresh the page. Thanks!

Thanks for digging into this @aonomike! Your research has given me the clue I needed.

@martijnr The recent releases of xlsform-online and xlsform-offline don't use pretty print to save space on the output. That was a decision I made unilaterally (:sweat:) that I thought was pretty safe, but it's already bitten me in downstream tools I maintain (:sob:).

In Java, if you use DocumentBuilderFactory and call getChildNodes() on an Element whitespace between elements are considered nodes, so you have to iterate through the nodes and make sure the node is a true node (Node.ELEMENT_NODE). Not sure that helps, but that might be a place to start looking.

Interesting. It may have been a whitespace bug in Enketo in the version of 1.5 years ago that @aonomike is using that appears to have since been fixed (I haven't looked back to search for such a fix - period is too long). Thanks for your research @aonomike.

As long as the pyxform output is valid XML, you're off the hook in my opinion @yanokwa ;).

1 Like