IATI / D-Portal

http://d-portal.org/
Other
30 stars 23 forks source link

Duplicate transactions on some views #641

Open markbrough opened 2 years ago

markbrough commented 2 years ago

I'm not sure if this is generally used, but I normally found it a nice and easy way to quickly preview activities.

However, I just noticed that each transaction is displayed twice: https://d-portal.org/q.html?aid=US-GOV-1-72066921LA00001

The source XML shows transactions only once: https://d-portal.org/q.xml?aid=US-GOV-1-72066921LA00001

As does Datastore Classic: https://datastore.codeforiati.org/api/1/access/activity.xml?iati-identifier=US-GOV-1-72066921LA00001

In this view, transactions are displayed (correctly) only once each: https://d-portal.org/ctrack.html#view=act&aid=US-GOV-1-72066921LA00001

xriss commented 2 years ago

That is strange, will take a look.

BTW the difference is one view is built on the server and the other is built in the browser and it probably got broken somehow when we switched to streaming which was a big rewrite of how results like this are generated.

notshi commented 2 years ago

Thanks for raising this, Mark.

Should probably mention that we've made some changes to the SAVi view and it now has it's own url.

So for the example you mentioned, the updated url is https://d-portal.org/savi/?aid=US-GOV-1-72066921LA00001

where q.html is replaced with savi/. You can still switch to the print-friendly theme if you prefer.

You can also view org files this way (loading times might differ depending on how large these can get).

Here is the discussion about it (link).

markbrough commented 2 years ago

Oh cool, thanks a lot for the reply and clarification, guys! Do you think it might sense to remove / redirect q.html to avoid confusion?

notshi commented 2 years ago

q is our (raw data) API location and returns a pure html page, where it was previously loading javascript to display the theme; ie. you can 'View source' here and not a SAVi page.

In essence, to remove/redirect q.extension would be to change the d-portal API location so not ideal :)

We've decided to display the print-friendly theme here to differentiate the raw data from the themed SAVi. Hope that makes sense.

Btw, you can view the SAVi version from q.html via the iati-identifier link.

notshi commented 2 years ago

Hi @markbrough this fix is now live. Could you check and let me know otherwise?

It was indeed due to the streaming update that this triggered a double passing of the first activity. Graphs should also now work where it wasn't previously due to mixed content https issues.