Failed to update the event in the server. An error occured, please check import summary

While updating a stage for a TEI in a program, our teams are facing this problem:
image

We can’t track it in the catalina file.
Any idea how we can check the import summary?
thx in advance.
cc @dhis2-tracker
Best,
B.

2 Likes

Hey @SDKAAA,
You can open the developer tools in Chrome, select the network tab, and do the failing operation in the tracker. This will show the call going to the server, and the import summary containing the server error message being returned will be in the response.

Best regards,
Markus

2 Likes

Thx @Markus
I will do that in order to track the error.
Best,
B

2 Likes

Thx @Markus
Apparently the problem is with fields not provided with a value while their sections are hidden.
Though this was not necessary in 2.28 when the section is hidden, it appears in 2.31 the error is firing.

Do you guys consider this a bug or a feature? in order to log it properly in JIRA.
cc @dhis2-tracker
Best,
B.

1 Like

Hey @SDKAAA - yes nice observation.
In 2.31 the API is for the first time validating requests being sent. When trying to complete (and save) an event, the API requires that all required fields is set. Unless the user has the authority to skip validation as discussed in this thread:

A way to work around it can be to make a program rule that makes the fields mandatory only on the account of the section being visible.

1 Like

Thank You @Markus
will try that and revert back in case of problems.

1 Like

Hello again,
I’m facing the same error this time with a different import summary (under 2.32 and while completing a TEI):

angular.js:9866 PUT https://***/api/30/events/iDtDij9dZID 409 (Conflict)
(anonymous) @ angular.js:9866
n @ angular.js:9667
f @ angular.js:9383
(anonymous) @ angular.js:13248
$eval @ angular.js:14466
$digest @ angular.js:14282
$apply @ angular.js:14571
(anonymous) @ angular.js:21571
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014

Any help appreciated

1 Like

@Markus @dhis2-tracker any idea about this error?
the user is able to complete the event, but the error shows anyway.
The above happened after an update from 2.28 to 2.32

1 Like

@SDKAAA Can you share the complete API response? Also the relevant section of the logs if possible?

1 Like

Thank you Ameen,
Yes indeed i was looking in the wrong place to read the summary…
Apparently it was a group of fields that were set to mandatory.
I fixed it by marking them non mandatory and then creating a program rule to set them mandatory based on the case we have.
Thank you for your help.

3 Likes

Hi @SDKAAA ,

I am having almost the same problem. I want to update some tracked attributes, but I get the following error: “Failed to update the tracked entity instance in the server
An error occurred, please check import summary

The attributes I want to update are encircled in the image below. the first (Id da casa) is non mandatory and the second (proveniencia) is mandatory. I have made all them non mandatory and tried to update them but no success.

Thanks

1 Like

@hernandezmachava did you clear the cache after doing the edits?