Upload-contact-forms command fails with original CHT forms

@oyierphil This is a newly added feature of cht-conf where it does additional validation to catch form errors early, in this case, that your latrine field has a relevant that references an xml element that doesn’t exist. If you think this is incorrect, or the message could be improved in some way, let me know.

1 Like

@gareth, I skipped validation and completed form conversion, there was no update on the app though after the conversion, some homework for the weekend…

I have managed to use skip validation for now on the XPath errors, but the app doesn’t load forms for places and contacts as I expected. Was hoping to have high-level place on the base-settings file: National office - County Office - Sub County Office - Link Facility - Community Units - etc. Instead, the app starts from New District - Health Facility, which isn’t in my hierarchy or config.

I have emptied contents of the messages-en translation config file and currently empty, I get the same landing page, New District - Health Facility etc, not sure where it is coming from

Will really appreciate your insights on what we are missing so that we conclude the process and move to the field, best

Hi @oyierphil

I believe this was already partially addressed in another thread: Translation for Community Testing App - #13 by diana

Or is this pertaining to a completely separate issue?

@diana, yes, we are currently following on the same issue with diana to identify possible causes error, thanks

This seems to be the more appropriate thread to debug errors in uploading contact forms, than the other thread which is about translations. Would you mind if we continue the conversation about forms here?

I’m going to link to your reply in the other post to keep information concentrated here:

@diana, no worries, appreciate the support, currently looking at the type, name and calculation fields in the forms to see if there are errors

Thanks @oyierphil

From the error in your image, I think your contact form is misconfigured.
Can you please share the contents of the form so I can see the way the fields are set up?

@diana, I have shared a contact form for the CH_Supervisor

I have logged in to the app as a CHW, and I can see targets, different from my target config file, trying to find out why it doesn’t load my configs, including targets

I have handled most of the xPath errors and form conversion is complete, only one error on one form, Hosehold create and edit still persists, will figure it out tomorrow morning since conversions isn’t complete for this specific form, throws the error ‘Unknown question type’.
type name choices
select_one health_insurance health_insurance yes/no

I have checked App Management Console of the app and I can see the App forms, still puzzled why the same can’t load, even after uploading and converting both the contact and forms? I still get a blank page with no option for creating any place with the message, No people found

Hi @oyierphil

Thanks for the update.
Please let me know if you still have trouble with contacts loading after you fix this last form, or if you have trouble fixing it.

I have sorted out the error with the form, successfully converted and uploaded both contact and app forms now, still can’t create any place as admin. It shows no form, no activity but with a blank screen reading No person selected, No people found
I have seen this warning while converting the forms:
WARN Form validation endpoint not found in your version of CHT Core, no form will be checked before push

Any idea where the culprit might be, thank you

Hi @oyierphil

Can you please check the settings document in the database of your instance, to verify that contact_types are correctly set up?

@diana, please clarify settings document in the database of your instance.
I have a demo for the current config tomorrow, thus have to review and sort out the bug, thank you

hi @oyierphil

I’m referring to this document: (this is the instance you linked to in another thread).
Inspecting it, I can find two contact_types entries. I think you’ve been adding your config changes at the wrong level, under uhc:


I can also see you added replication_depth there. That needs to be at a lower level as well.
In your config, please make sure you add these properties at the lowest level and re-upload.

I have reviewed base_settings config by pushing `replication_depth’ to a lower depth and having contact_types entries not under any level. When I upload the revisions and compile the settings using:
cht --url=https://medic:password@ --accept-self-signed-certs compile-app-settings upload-app-settings

Nothing happens when I login as admin, same screen. Checking the settings, I see the same wrong level as shared above.
I further have seen the warning, “Warn Forms Dir Not Found” as below:

This has been an interesting journey full of learning, will appreciate your insights, I feel we are almost there, it will work tomorrow!!

Hi @oyierphil

Please remove the “parents” property for your “national_office” contact type.

"id": "national_office",
"name_key": "contact.type.national_office",
"group_key": "contact.type.national_office.plural",
"create_key": "contact.type.national_office.new",
"edit_key": "contact.type.place.edit",
"primary_contact_key": "national_office.field.contact",
"icon": "medic-national",
"create_form": "form:contact:national_office:create",
"edit_form": "form:contact:national_office:edit"

Thank you very much, we have made progress.
Now we can create the National Office and Contact Person, I can’t go down the hierarchy though to create the other levels, counties, sub-counties etc, then register clients and finally conduct case investigation. It gets stuck at creating only the National Level as below:

I had two app forms, only one shows, Creating Community Units


It looks like you’re using a different name for your contact in your config versus your forms.

In your settings:

"id": "county_office",
"name_key": "contact.type.county_office",
"group_key": "contact.type.county_office.plural",
"create_key": "contact.type.county_office.new",
"edit_key": "contact.type.place.edit",
"primary_contact_key": "county_office.field.contact",
"parents": [
"icon": "medic-county",
"create_form": "form:contact:county-office:create",
"edit_form": "form:contact:county-office:edit"

Your create form is form:contact:county-office:create, while your contact type uses an underscore (county_office) and your form is form:contact:county_office:create.

"id": "form:contact:county_office:create",
"key": [
"value": null,
"doc": {
"_id": "form:contact:county_office:create",
"_rev": "18-922e218e0e41f9365dff1e5d00fe01ad",
"type": "form",
"internalId": "contact:county_office:create",
"xmlVersion": {
"time": 1665089894518,
"sha256": "706adedbfad663378a25668d90c8c9460e63c40ac7910c41520e765ed466bd60"
"title": "New County Office",
"context": {
"person": false,
"place": false

Please go over all your contact types and their forms and make sure that they match the actual form names exactly.

@diana, I missed out one form in the hierarchy, the one for creating clients, reason for my clients. Most forms can now load, had to review the hierarchy and remove one level, CU which was causing a lot of trouble with GPS locations, affecting two test VMs, despite only working on one for the current config (Strange) :slightly_smiling_face:. Had managed to register clients and load Case Investigation Forms, after some changes in the configs as I review different options, now the Add Action is inactive, will review tomorrow and now fine-tune for speed and efficient loading, thank you for your assistance