Multiple event saved in program stages in Tracker Capture

While filling up the data in program stages, it saves the data but multiple events for the same data is saved as shown in the image below. Why is this hapenning?

Hello @sthrohit,

Can you explain a bit more about what is wrong with the way the events are shown? What are you expecting to see? This is how repeatable events are visualized when you are using tabular entry. The data elements that have “Show in reports” enabled will be shown with entered values next to report date and Organisation Unit.

Best regards,
Karoline

HI @Karoline,
Sorry for the late reply
The problem is not with repetitive events . But at first there are no events but when i saved the first events it shows two duplicates events automatically.

@sthrohit and @Karoline, we are having this same issue in our DHIS2 instance with Tracker Capture. In some of our testing, we see duplicate events show up even though only one event has been created. This does not happen consistently so it’s hard to reproduce. It sometimes resolves with a Browser Cache Cleaning. Did you ever find the cause of this issue?

Thank you for your post @AdamL and welcome to the community! :tada:

Please what is the version of dhis2 that you are using? This seems like a cache issue but maybe the cache isn’t clearing properly. Perhaps try the following:

1 Like

Thank you, @Gassim !

We are using 2.37.6.1-SNAPSHOT. We upgraded from 2.37.2 about one month ago, and started occasionally noticing the issue shortly after that, so it’s possible there is some connection there.

Before I implement your suggestions, a couple of questions so I can make sure I understand and do not cause any further issues. We are preparing to launch our annual data collection cycle for ~1,000 users tomorrow, meaning that we will be sharing program stages that have been locked to them for the past few months, and will thus have a lot of new user activity on our DHIS2 site.

  1. Suggestion 1 - are there any risks to clearing application cache and reloading apps? And if I run this from my account, is this something that will affect every user/browser, or just my own?
  2. Suggestion 2 - is this something to try only if Suggestion 1 doesn’t work? And similarly, is it something that would affect (and hopefully resolve the issue) for all users, or just my own?
  3. Suggestion 3 - this one seems like it would be something for each individual user to do, in whatever browser(s) they use, correct?
1 Like

Hi @AdamL

Sorry this reply is a little late, but in answer to your questions, clearing caches do not introduce any risks. Caches are there only to remove performance burdens from the underlying system and database. When a cache is cleared, the next call will retrieve the data from the system, and that new data will be cached for subsequent requests until it goes out of date (or is cleared manually again).
The application cache is on the server and clearing it will affect (benefit) all users - by providing up-to-date data.
All of the “browser” cache cleaning suggestions are for individual users, as you guessed.

Kind regards,
Phil

1 Like

@phil , thank you for the reply. Somehow I missed it last week. Just writing to say that I have now experienced the issue again. It’s been very difficult to replicate. In fact, today is the first time I have experienced it. I had not experienced this issue at all in dozens of hours of testing over the past month, whereas three colleagues had. Now I experienced it today for no apparent reason. That was after having done “Clear application cache” and “Reload apps” a couple of weeks ago and none of us having experienced this issue up until then.

When it happened, I not only see duplicate tabular data entry rows to those events, but upon clicking on one of those rows, the whole event page actually shows up in duplicate - with a duplicate set of questions and a duplicate set of Complete/Delete/Print buttons at the bottom. It happens on all stages of our Tracker form, even non-repeatable stages. When it happened I also noticed that the tracker page took much longer to open than normal. Typically it takes just about 1 second, but this time it was trying to load for 5-10 seconds. The bug was short-lived. When I navigated to a different TEI/enrollment in our Tracker Program, I no longer saw duplicates. Nor did I when I returned to the original TEI/enrollment where it was happening.

I am having trouble sharing screenshots here (the post just gets stuck at “Processing upload”), but am happy to share them in a different way. We are hoping to find the cause of this for certain since we have over 1000 users and don’t want any of them experiencing the issue and perhaps accidentally deleting an event because they think they have created a duplicate.

Thanks for clarifying on the cache cleaning options. One follow-up question - we have been trying to see if there is a way to avoid asking all users to clear cache via the Browser Cache Cleaner app if/when we realize we need to back some back-end fixes like changing a Program Rule. Is the Data Administration app (Data Administration app → Maintenance → Clear application cache and the Reload apps) a possible option for this? I was hoping that it might be. But when I test this out (creating a Program Rule, doing Clear application case and Reload apps) and then open Tracker from a separate computer, I see that the browser of that computer is still showing the “old” version of the Tracker form (without the Program Rule) until I do Browser Cache Cleaner on that computer.

Hi @AdamL

Firstly, are you still using 2.37.6.1-SNAPSHOT? In general, we would not recommend using the “SNAPSHOT” versions, as they represent untested points “between” patches. I would recommend you update to 2.37.7.1 (the latest patch + hotfix). I’m not saying that this will fix your issue, but we cannot support unstable baselines, so it’s best to keep up to date in any case.

I’ll ask the development team @dhis2-tracker if they have any thoughts or suggestions regarding your issue.

You cannot force the users browsers to clear their cache, but the metadata caches will be updated when there is a new version number for a given program.

Kind regards,
Phil

1 Like

Thanks for this info! I never payed much attention to ‘version’ in program description. :slight_smile:

Thank you, @phil . Let me ask our hosting company about upgrading to 2.37.7.1. A few weeks ago we had done a version upgrade from 2.37.2 and the the hosting company had advised that we go to v 2.37.6 since there was apparently some performance issue or vulnerability with 2.37.7 that they had recently learned of. Hopefully that issue was resolved with the latest patch.

Dear @AdamL,

Regarding the duplicates and cache issue, it will be better to support you on one of the latest versions, so once this is recurring in one of the latest supported instances, please share! I assume this might be happening because you are using SNAPSHOT too.

As for the vulnerability concerns, I will try to get back to you asap. - @AdamL ; there’s no known vulnerability in 2.37.7 so please if there are any concerns would you ask your hosting company to reach out to security@dhis2.org .

Thank you!