Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in pyxform behavior break submission editing #3751

Closed
jnm opened this issue Apr 4, 2022 · 1 comment · Fixed by #3757
Closed

Changes in pyxform behavior break submission editing #3751

jnm opened this issue Apr 4, 2022 · 1 comment · Fixed by #3757
Assignees
Labels
bug Things broken and not working as expected high priority To be done soon

Comments

@jnm
Copy link
Member

jnm commented Apr 4, 2022

Consider:

  • person makes and deploys a form
  • KoBoCAT uses pyxform to convert the form to XML XForm
  • KoBoCAT stores the resulting XML in its Postgres database
  • person collects a submission with that form
  • we upgrade pyxform to a new version that forbids something¹ done in that form
  • person now tries to edit a submission they collected:
    • if they use kobocat, it works! the change in pyxform behavior doesn't matter because the XML XForm is stored in KoBoCAT's database
    • if they use KPI (Open edit/preview Enketo Express links with KPI as OpenRosa server #3689), it breaks! KPI does not store the XML XForm permanently. when the edit request is made, KPI invokes pyxform in an attempt to generate the XML XForm, and it fails.

¹ allow_choice_duplicates: XLSForm/pyxform#23; we didn't bring in this change until May 2021

Result:
Person inexplicably (from their perspective) cannot edit their submissions. They see a cryptic error: Start tag expected, '<' not found.
image

@jnm jnm added the bug Things broken and not working as expected label Apr 4, 2022
@jnm jnm added the high priority To be done soon label Apr 4, 2022
@jnm
Copy link
Member Author

jnm commented Apr 4, 2022

@joshuaberetta found that when this happens, KPI serves an empty document to Enketo. This also happens when attempting to download a form as XML from KPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things broken and not working as expected high priority To be done soon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants