Cannot update form using XLSForm Online v.2.x

I tried to update an existing form using XLSForm Online v.2.x. I followed all of the instructions in the documentation (including maintaining the filename of the .xlxs file). When I tried to upload to Aggregate v.2.0.3 I got the following error: ''Form Already Exists for this Namespace/Id attribute'. I looked at the XML for the old form and the new form and realized that the filename was missing from the new form, but it appeared 415 times in the old form. I fixed the problem by using the Previous Version of XLSForm online.

I am posting here as in case others have the same issue and to find out if this is a bug or a deliberate change. (The filename thing was quite annoying in the previous version).

3 Likes

Good troubleshooting. :+1:

I agree! Using a standard root node name offers many benefits including letting you change filenames as you wish. This was a deliberate change and you can read more in the release notes for XLSForm Online v2.0.0. The documentation for the setting called name which lets you set the XML root node name is available here. Please try that with XLSForm Online v2.x and let us know if you run into any other issues.

Hi I'm a bit stuck. The link to the old XLSForm online converter has gone, so I tried to add the old filename as the 'name' attribute on the settings tab and tried to upload using v2.x.

To make sure I had the correct filename I downloaded the XML from the Aggregate server and copied the text in the code (in bold below). As I understand it this is the root node:

id="/machinery_surv_eng_lao_20190430.01

Unfortunately instead of updating I got the error: "Form Already Exists for this Namespace/Id attribute"

I updated the version number. Is it possible to update this form using v.2.x or do I need to find the link to the old convertor?

The v1 converter is available from https://getodk.org/xlsform/v1/. The link from the v2 converter is now at the bottom of the page.

There were other changes in v2 that would result in a different form structure and prevent an update with Aggregate. It's probably easiest to keep using v1 for this form and use v2 when you create new forms.

1 Like

Hi @LN !

I have the same problem but I'm unable to find the version 1 of tje XLSForm Online.
Could you help me ?

Thanks a lot

We've now removed the v1 converter because it's very far out of date, as is Aggregate. We strongly recommend migrating off Aggregate as soon as you can.

Did you try adding the filename to the name column in the settings sheet as described above and in https://xlsform.org/en/#specify-xforms-root-node-name?

If that doesn't work, please share your form XML as currently published on Aggregate and your XLSForm. Ideally you can share it publicly but if not, please send me a direct message so that I can investigate.

Hi @LN ,

The add of the name column seems to have no effect (no impact of the generated xml).

The new version use only values of choices list, the old version use csv external values.

Here are

  • the old xml form version (version 2020062901) generated with the v1 online generator (I add the version num to the file name just for this attachment)

  • the new xml form version (version 2024061901) generated with the actual online generator (I add the version num to the file name just for this attachment)

  • the new xls form version (version 2024061901) (I add the version num to the file name just for this attachment)
    BouqMarq_2024061901.xml (97.8 KB)
    BouqMarq_2020062901.xml (25.9 KB)
    BouqMarq_2024061901.xls (91 KB)

I tried with pyxform to find the good version of this tool (probably just befor the June 29th 2020 so the v1.1.0) to convert my xls form. Failed attempt !

Thanks for sharing the forms! Your original form from 2020 already had a data primary instance name so you don't need that name column, sorry. If you're able to run pyxform from the command line, that's great. What if you remove the name column and try that?

If you're still getting an error with that, please share the full text of the error.

Here is the error when I try to update the form with an xml file converted with pyxform 1.1.0 :
Form Already Exists for this Namespace/Id attribute org.opendatakit.aggregate.exception.ODKFormAlreadyExistsException

In attachment the actual XML form and the new one. Is the tag that cause the problem ?

BouqMarq_2020062901.xml (25.9 KB)
BouqMarq_2024062002.xls (48 KB)

@LN, I solved my problem. I made a copy of the old XML Form file and edit it. Step by step, with regular update submissions, I applied my changes. Now, the new XML Form version is accepted by ODKAggregate.

1 Like