Updating category combination fails in 2.39 and 2.40

Occurs in the 2 most recent Play demo instances (2.40.1 and

When updating a category combination, the action fails. The GUI presents an “OK” message but the console shows this error:

  1. {httpStatus: ‘Conflict’, httpStatusCode: 409, status: ‘ERROR’, message: ‘Update cannot be applied as it would make existing data values inaccessible’, errorCode: ‘E1120’}
saveFail @ EditModelForm.component.js:214
t.__tryOrUnsub @ Subscriber.js:242
t.error @ Subscriber.js:201
t._error @ Subscriber.js:132
t.error @ Subscriber.js:106
(anonymous) @ PromiseObservable.js:71
Promise.then (async)
t._subscribe @ PromiseObservable.js:62
e._trySubscribe @ Observable.js:172
e.subscribe @ Observable.js:160
_saveAction @ EditModelForm.component.js:231
o.handleClick @ EnhancedButton.js:146
o @ ReactErrorUtils.js:26
a @ EventPluginUtils.js:85
u @ EventPluginUtils.js:108
p @ EventPluginHub.js:43
m @ EventPluginHub.js:54
o @ forEachAccumulated.js:24
processEventQueue @ EventPluginHub.js:257
o @ ReactEventEmitterMixin.js:17
handleTopLevel @ ReactEventEmitterMixin.js:28
i @ ReactEventListener.js:72
perform @ Transaction.js:140
batchedUpdates @ ReactDefaultBatchingStrategy.js:62
i @ ReactUpdates.js:97
dispatchEvent @ ReactEventListener.js

The action fails in our own 2.40 and 2.39 instances installed on our own servers where data/metadata stems from older DHIS instances that were upgraded to the more recent DHIS versions.

However, it functioned properly on our own 2.39-Snapshot server when creating category options/categories/category combos from scratch.

The action functions properly in Play

Note the update test I attempted (which triggered the error above) was to make a minor modification to the category combo Name.

UPDATE: I see the Jira entry for a related issue here.
However, the lack of informative message persists, despite the Jira issue being marked as done. Furthermore, the changes I was making to the category Combo did not affect any dependent metadata but just the name of the catCombo. A change like that should be permitted, no?
And even when modifying a catCombo that is not associated with a dataElement, the Save hangs… upon refreshing the screen the saved record is available.

1 Like

Thanks for your post @LauraLincks and the link to the jira issue. In one of the related issues, @Lars explains:

When adding or removing a category from a category combination, then DHIS 2 will drop and recreate category option combinations (this because the existing category option combinations can no longer be valid). So when trying to delete a category option combination which have data values associated, the delete will fail with a foreign key constraint.
We could tackle this from a deletion handler perspective, and block the update of the category combination if it results in deleting category option combinations which have data values associated.

Additionally, if it’s marked as done and working in previous versions then it might be that the fix wasn’t part of the latest branch so I will make a comment in the jira issue.


1 Like

Hello @LauraLincks, I am having this similar issue. Were you able to get around it?