Upload-contact-forms command fails with original CHT forms

Hi @oyierphil

You can skip form validation by passing the - -skip-validate flag as part of the cht command.

2 Likes

@munjoma, this is noted. Will skip and test the forms, then find out the cause of validation errors so that I correct before project rollout

1 Like

@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…

@gareth
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

@diana
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.

@diana
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: https://41.204.187.106/medic/settings (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:

image

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.

@diana
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@41.204.187.106 --accept-self-signed-certs compile-app-settings upload-app-settings

Nothing happens when I login as admin, same screen. Checking the settings https://41.204.187.106/medic/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"
},

@diana
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