ODK Central: Submission fails with URL-prefilled fields

Hello dear ODK community!

1. What is the problem? Be very detailed.

Prefilling form fields via the URL in the scheme ?d[field_name]=field_value works fine (I think it's an Enketo feature), however, when trying to submit, the following error message pops up:

Submission service on data server not found. (404)

When analyzing the underlying submission request, this is the server's response:

  <OpenRosaResponse xmlns="http://openrosa.org/http/response" items="0">
    <message nature="error">You tried to update an existing submission, but we can&#39;t find that submission to update (uuid:d21fa12f-0fad-43c0-a928-cd88ca9959bd)</message>
  </OpenRosaResponse>

I noticed that the given UUID reflects the deprecatedID of the submission request, not the instanceID. But I'm not sure if this is the actual cause to the problem.

<meta>
<instanceID>uuid:ea6babfc-9bbd-4825-881d-13add3a338f5</instanceID>
<deprecatedID>uuid:d21fa12f-0fad-43c0-a928-cd88ca9959bd</deprecatedID>
</meta>

When submitting without URL-prefilled fields, there is no deprecatedID in the request:

<meta>
<instanceID>uuid:9817e77f-2e83-4558-938f-4f4ec0cfb3ea</instanceID>
</meta>

How can I make URL-prefills work? Is this a bug or is this not supported by ODK Central?

Note that the same form works fine with URL prefill in the former Aggregate environment.

2. What app or server are you using and on what device and operating system? Include version numbers.

ODK Central 1.2.1
includes Enketo 2.7.3

3. What you have you tried to fix the problem?

Analyzed, see above.

4. What steps can we take to reproduce the problem?

See attached minimal one-field example. Works fine if simply opened and submitted. Will fail with the above error when the following gets attached to the form URL as prefill: ?d[field_name]=12345
prefill_issue.xlsx (11.4 KB)

2 Likes

Does someone from the ODK team have a hint for me, whether such URL-prefills should generally be supported by Central? A.k.a., this is a bug? Or is this outside of Central's feature scope?

1 Like

@vlehn This feature should work (and should be documented). The bug is likely in Enketo. It should not be adding a deprecatedID to the submission. I'll have the team look into this and report back with what we find.

3 Likes

This issue has been fixed in Central v1.3.2.