Data Entry (Beta) app not loading dataSet form

Please try to test again in your browser’s Guest mode (since there’s no cache for each new session.) This might be caused by cache?

Thanks!

In Guest mode I run into the same problem.

I don’t see any problems with the maintenance app saving indicator/section assignments in our current version of the maintenance app on play/dev, but that would explain the problem you are having with the data entry app, Jet. If you can reproduce the problem with the maintenance app on a play instance, we’d be happy to look into it more

2 Likes

I was able to resolve this by deleting the record in the sectionindicators table in the database. Then clear all site storage. I also have to use the Data Administration app to reload the app. After several trials, the /api/section/ data is no longer fetching indicators and as such the App was able to open.

2 Likes

Hi @Gassim,

This thread just helped me to solve an issue we had when loading the data entry app just after removing indicators from the dataSet.

{
“app_name”: “Data Entry”,
“app_version”: “101.0.15”,
“dhis2_version”: “2.41.3”,
“dhis2_revision”: “9c942a6”
}

The indicators were present in the data Set, and were also added to the different sections.

I removed the indicators from the datasSet using the maintenance app, believing they would also be removed from the sections. When looking at the sections from the maintenance app, the indicators were not displayed, and i believed they were removed.

However, when loading the data enty app (even after clearing the cache, and using the data administration app to reload app), we had a similar message saying:

Error: Cannot read properties of undefined (reading ‘displayFormName’)

To solve the issue, I had to first add again the indicators to the dataSet, and then edit the sections. I was able to see that the indicators were already present in the section, after adding them to the dataSet, so i am pretty sure they were just not removed from the section on the first try.

I then removed the indicators from the section first, and then from the dataSet.

This solved the issue (after clearing the cache and reloading aps, but not sure if this was needed).

In summary:

I believe the Maintenance app does not remove indicators from the dataSet sections, when the user just removes the indicators directly from the dataSet.

Even though they don’t show in the maintenance app, when editing the sections, the data entry app still tries to load them and crasches because they are not in the dataSet, but only in the section.

Workaround Solution:
Add again the indictors to the dataset, and remove them first from the sectioon, and then from the dataset.

Hope this may help to spot a bug, and prevent other users from loosing much time because of this bug.

Have a very good day and thanks @jetisco4u and responders to this post which saved my day.

Regards

PS: Not sure if there is a link, but FYI also used to have a custom form for this dataSet, and then deleted the custom form to go back to a saction From.

1 Like

Hi @gregory. Sorry for the problems here and thanks for investigating and reaching out. It looks like you have found the root cause of the problem in the data entry app. Removing indicators from a data set would presumably remove them from associated data set sections, but this does not seem to happen and then the app is missing metadata for the indicators and crashes.

I’ve opened a ticket for this main issue Jira. We may also look into making a temporary workaround fix in the data entry app, in which case we will provide an update here.

PS: Not sure if there is a link, but FYI also used to have a custom form for this dataSet, and then deleted the custom form to go back to a saction From.

This is the current workflow. A custom form takes precedence over sections (unless you are entering data via Android which cannot load custom forms). If you want to switch back to using sections, you need to delete the custom form. We will be making this workflow clearer when data set editing is added to the new Maintenance App, which we anticipate will be ready in 1-2 months.

2 Likes

@tzemp
Thanks for creating the ticket on Jira.

For the custom form deleted, I did understand how it works, but i added this precsion, just in case the bug only happens when there used to be a custom form on the dataSet.

Regards

2 Likes