Hello DHIS2 Community,
Let me share my very first experience with DHIS2
I started working on version 2.41.3 just three weeks ago, and I’ve already learned so much — the DHIS2 ecosystem is really impressive and exciting! Just as I was starting to get comfortable, version 2.42.0 was released… and I jumped in to test the new features right away.
Everything went well, until I encountered a blocking issue when using data validation in the aggregate data entry form. Specifically:
When I click on “Run validation” in the data entry form, and more than 50 validation rules are linked to the data set, the interface crashes with the following error in the browser console:
TypeError: Cannot read properties of undefined (reading 'importance')
What’s surprising is that in version 2.41.3, I had over 460 validation rules and everything worked perfectly. So I thought: humm… maybe something is wrong with my rules? I tested them block by block (20, 30, up to 60), and all of them imported and worked fine — no issues.
That’s when I dug deeper — I opened the DevTools → Network tab, and boom , I saw this API call:
{
pager: { page: 1, total: 96, pageSize: 50 },
validationRules: [...]
}
That’s when things clicked. My assumption is that the frontend only processes the first 50 validation rules (page 1), but tries to render all of them linked to the dataset. When it reaches a rule that hasn’t been loaded (e.g., from page 2), it hits undefined
— hence the crash
In short:
DHIS2 version used: 2.42.0
More than 50 validation rules = JavaScript error in aggregate data entry screen
Under 50 rules: everything works fine
In 2.41.x, I had 460+ rules without any issue
My questions to the community:
Is there a way to disable pagination (e.g.,
paging=false
) or increase the pageSize
for the /validationRules
resource in the UI?
Is this value configurable somewhere in DHIS2 2.42 system settings?
And if pagination is removed, could it negatively impact performance?
Thanks so much for your help — I’m new here, but I’m learning a lot and absolutely loving the DHIS2 ecosystem, even with its little challenges