Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Map disappeared RSR locations #201

Closed
lauraroverts opened this issue Apr 16, 2015 · 24 comments
Closed

Map disappeared RSR locations #201

lauraroverts opened this issue Apr 16, 2015 · 24 comments
Assignees

Comments

@lauraroverts
Copy link

At the country pages of the WASH Alliance website, for example http://www.washalliance.nl/local-alliances/kenya/?preview=true&preview_id=575&preview_nonce=51b16b4505, there used to be a map in the upper left box that showed the project locations that are linked to that country (http://washalliance.akvoapp.org/projects/?title=&location=404&status=&organisation=&sector=).

Now a photo appeared in that box.

Also in the admin, for example http://www.washalliance.nl/wp-admin/post.php?post=575&action=edit, on the right hand side, it used to be possible to filter for a country in the dropdown menu, in order to display RSR updates from that country, but now the only possibility in the dropdown meny is 'none'.
screen shot 2015-04-16 at 09 37 23

@lauraroverts
Copy link
Author

@KasperBrandt Could you also have a look at this?

Besides what is written above, also project updates that are linked to a specific country used to show up at the bottom of the page. But at some pages, like http://www.washalliance.nl/local-alliances/bangladesh/, the updates have disappeared. Only blogs show up.

@rumeshkumar
Copy link

I will check on this issue and get back to you as soon as possible.

On 16 April 2015 at 16:43, lauraroverts notifications@github.com wrote:

Assigned #201 #201 to
@rumeshkumar https://github.com/rumeshkumar.


Reply to this email directly or view it on GitHub
#201 (comment).

Regards,
N Rumeshkumar

Project Manager
M: +94 771304626 | Skype: rumeshin

WebGurus International Pvt. Ltd., 621, 2nd floor, Nawala Road, Rajagiriya,
Sri Lanka.
W: www.webgurus.lk | T: +94 114502542

@KasperBrandt
Copy link

Hi @rumeshkumar, did you manage to take a look at this already? If you need any help, please contact me on Skype (kasper.brandt87).

@rumeshkumar
Copy link

Yes, I was working on another Akvo site today but spent few hours on
checking this issue.

This List of Countries are fetched when running a project update according
to the code. But it seems like the API calls which fetch these countries do
not return required values or are changed. I did not really run through the
code line by line still.

Could you please check whether there are any changes done in API URLs ?

For ex, the API URL to fetch countries is "
http://rsr.akvo.org/api/v1/country/?format=json&limit=0"

Please update me on this. If there are any changes in this API URL, the
code has to be modified accordingly or API URL has to be changed to match
the code.

I will have a look at this issue again tomorrow.

On 23 April 2015 at 15:21, Kasper Brandt notifications@github.com wrote:

Hi @rumeshkumar https://github.com/rumeshkumar, did you manage to take
a look at this already? If you need any help, please contact me on Skype
(kasper.brandt87).


Reply to this email directly or view it on GitHub
#201 (comment).

Regards,
N Rumeshkumar

Project Manager
M: +94 771304626 | Skype: rumeshin

WebGurus International Pvt. Ltd., 621, 2nd floor, Nawala Road, Rajagiriya,
Sri Lanka.
W: www.webgurus.lk | T: +94 114502542

@rumeshkumar
Copy link

I have checked it again today morning.

It happens due to data mismatch. As I can see , countries are fetched using
the following API URL

http://rsr.akvo.org/api/v1/country/?format=json&limit=0

and, project locations are fetched using API URL

http://rsr.akvo.org/api/v1/project_location/?format=json&limit=2120&project__partnerships__organisation=275

Here, 275 is the organization ID for washalliance project.

The system is developed such a that it checks for matching data in both
countries and project locations. But, there are no matching values
unfortunately. Due to this, the system does not store project locations in
the database thus the drop down in Project Update widget does not have any
value to select.

I am sure that the system is developed to work accordingly with the values
returned by these API URLs. So, please check with the people who developed
the RSR section.

Please let me know if I have to check anything more to help you in this
matter.

On 23 April 2015 at 18:28, Rumeshkumar Navaratnam rumesh@webgurus.lk
wrote:

Yes, I was working on another Akvo site today but spent few hours on
checking this issue.

This List of Countries are fetched when running a project update according
to the code. But it seems like the API calls which fetch these countries do
not return required values or are changed. I did not really run through the
code line by line still.

Could you please check whether there are any changes done in API URLs ?

For ex, the API URL to fetch countries is "
http://rsr.akvo.org/api/v1/country/?format=json&limit=0"

Please update me on this. If there are any changes in this API URL, the
code has to be modified accordingly or API URL has to be changed to match
the code.

I will have a look at this issue again tomorrow.

On 23 April 2015 at 15:21, Kasper Brandt notifications@github.com wrote:

Hi @rumeshkumar https://github.com/rumeshkumar, did you manage to take
a look at this already? If you need any help, please contact me on Skype
(kasper.brandt87).


Reply to this email directly or view it on GitHub
#201 (comment).

Regards,
N Rumeshkumar

Project Manager
M: +94 771304626 | Skype: rumeshin

WebGurus International Pvt. Ltd., 621, 2nd floor, Nawala Road, Rajagiriya,
Sri Lanka.
W: www.webgurus.lk | T: +94 114502542

Regards,
N Rumeshkumar

Project Manager
M: +94 771304626 | Skype: rumeshin

WebGurus International Pvt. Ltd., 621, 2nd floor, Nawala Road, Rajagiriya,
Sri Lanka.
W: www.webgurus.lk | T: +94 114502542

@lauraroverts
Copy link
Author

Thanks Rumesh.
@KasperBrandt can you check this? Cause the problem occurs at all Akvo Sites.

@KasperBrandt
Copy link

Thanks @rumeshkumar, I'll take a look today.

@KasperBrandt
Copy link

I've looked at the issue with @kardan, and we've found out that this issue is due to a change in our API. We have limited the number of returned results to a maximum of 10 per page, meaning that is only possible to get 10 projects, project locations, countries or any other resource at a time on one page. Previously we allowed an unlimited number, but this caused performance issues on the RSR servers, therefore we decided on this measure.

We will very probably be scaling this up to 30 items by default and a maximum of 100 items soon. This, however, does not completely solve the issue for Akvo Sites, unless the script for loading maps will be adjusted to handle paginated results.

Another change we will be making is to provide a specific resource for maps, so that it becomes easier to retrieve all map information in one call (see akvo/akvo-rsr#1521). This will still only return 100 items per page max, so a change to the scripts used on Akvo Sites is probably needed. These changes will be deployed on next release (v3.3), which is due on May 7th.

@rumeshkumar
Copy link

Okay, So I will wait for the changes on your side. Please update me with
all the required details once changes are ready.

On 24 April 2015 at 17:23, Kasper Brandt notifications@github.com wrote:

I've looked at the issue with @kardan https://github.com/kardan, and
we've found out that this issue is due to a change in our API. We have
limited the number of returned results to a maximum of 10 per page, meaning
that is only possible to get 10 projects, project locations, countries or
any other resource at a time on one page. Previously we allowed an
unlimited number, but this caused performance issues on the RSR servers,
therefore we decided on this measure.

We will very probably be scaling this up to 30 items by default and a
maximum of 100 items soon. This, however, does not completely solve the
issue for Akvo Sites, unless the script for loading maps will be adjusted
to handle paginated results.

Another change we will be making is to provide a specific resource for
maps, so that it becomes easier to retrieve all map information in one call
(see akvo/akvo-rsr#1521 akvo/akvo-rsr#1521).
This will still only return 100 items per page max, so a change to the
scripts used on Akvo Sites is probably needed. These changes will be
deployed on next release (v3.3), which is due on May 7th.


Reply to this email directly or view it on GitHub
#201 (comment).

Regards,
N Rumeshkumar

Project Manager
M: +94 771304626 | Skype: rumeshin

WebGurus International Pvt. Ltd., 621, 2nd floor, Nawala Road, Rajagiriya,
Sri Lanka.
W: www.webgurus.lk | T: +94 114502542

@KasperBrandt
Copy link

Hi @rumeshkumar,

We've implemented the changes today, and there's 3 new API endpoints for map information (login needed to view these, if you don't have one you can register on http://rsr.akvo.org/register/):

These endpoints should have all information needed for the maps. Also, you can see per endpoint what filters are possible on these pages. If anything's unclear or if you need more information, please let us know.

@lauraroverts
Copy link
Author

@rumeshkumar Would like to ask you to give this issue more priority than the other things you are working on for Akvo.

@lauraroverts
Copy link
Author

Is there any progress on this?

@rumeshkumar
Copy link

Hi,
I stared to work on it. I will update you once done.

@rumeshkumar
Copy link

Hi @KasperBrandt,

Could you please let me know how can I set auth credentials?

@rumeshkumar
Copy link

@KasperBrandt

I am using CURL to fetch required data

@KasperBrandt
Copy link

Hi @rumeshkumar, you should provide a header with "Authorization" as name, and "Token {api key}" as content. So:

Authorization: Token {api_key}

The API key itself is linked to a user account. Could you create (and activate) a user account on http://rsr.akvo.org/register/ ? Then I will send you your API key.

@rumeshkumar
Copy link

I have created an account already. I used "rumesh@webgurus.lk" to register.

On 26 May 2015 at 20:16, Kasper Brandt notifications@github.com wrote:

Hi @rumeshkumar https://github.com/rumeshkumar, you should provide a
header with "Authorization" as name, and "Token {api key}" as content. So:

Authorization: Token {api_key}

The API key itself is linked to a user account. Could you create (and
activate) a user account on http://rsr.akvo.org/register/ ? Then I will
send you your API key.


Reply to this email directly or view it on GitHub
#201 (comment).

Regards,
N Rumeshkumar

Project Manager
M: +94 771304626 | Skype: rumeshin

WebGurus International Pvt. Ltd., 621, 2nd floor, Nawala Road, Rajagiriya,
Sri Lanka.
W: www.webgurus.lk | T: +94 114502542

@KasperBrandt
Copy link

Ok, great. I've sent you your API key just now.

@rumeshkumar
Copy link

Got it. Thanks

On 27 May 2015 at 16:03, Kasper Brandt notifications@github.com wrote:

Ok, great. I've sent you your API key just now.


Reply to this email directly or view it on GitHub
#201 (comment).

Regards,
N Rumeshkumar

Project Manager
M: +94 771304626 | Skype: rumeshin

WebGurus International Pvt. Ltd., 621, 2nd floor, Nawala Road, Rajagiriya,
Sri Lanka.
W: www.webgurus.lk | T: +94 114502542

@lauraroverts
Copy link
Author

Dear Rumesh, Please give me an update on this issue. It is taking a very long time for the issue to be resolved.

Partners are complaining about the following:
Due to the maps have disappeared, some website look really weird, because you can only see the ocean on the map (http://www.gnwp.nl), or the Akvo logo is now the placeholder for RSR updates without an update (http://srhralliance.org) (issue #204) and different images show up in the box where should be a google map (http://www.washalliance.nl/local-alliances/bangladesh/) and RSR updates from other countries show up at a specific country page (http://www.washalliance.nl/local-alliances/bangladesh/).

@rumeshkumar
Copy link

Sorry for the delay. I have started to work on this and I will make sure
that it will be ready end of this week.

On 1 June 2015 at 16:02, lauraroverts notifications@github.com wrote:

Dear Rumesh, Please give me an update on this issue. It is taking a very
long time for the issue to be resolved.

Partners are complaining about the following:
Due to the maps have disappeared, some website look really weird, because
you can only see the ocean on the map (http://www.gnwp.nl), or the Akvo
logo is now the placeholder for RSR updates without an update (
http://srhralliance.org) (issue #204
#204) and different images
show up in the box where should be a google map (
http://www.washalliance.nl/local-alliances/bangladesh/) and RSR updates
from other countries show up at a specific country page (
http://www.washalliance.nl/local-alliances/bangladesh/).


Reply to this email directly or view it on GitHub
#201 (comment).

Regards,
N Rumeshkumar

Project Manager
M: +94 771304626 | Skype: rumeshin

WebGurus International Pvt. Ltd., 621, 2nd floor, Nawala Road, Rajagiriya,
Sri Lanka.
W: www.webgurus.lk | T: +94 114502542

@rumeshkumar
Copy link

I had a skype chat with Kasper yesterday regarding the issue I faced during the development. That is, Going to http://rsr.akvo.org/rest/v1/project_update/?limit=500&page=5 gives Internal Server Error. He told me that it is due to some bug with the images of the update.

As I told you before, I could not get project updates per project as the server throws Gateway Timeout error (Too many request). If there are 100 projects, I have to send 100 asynchronous request to server and that is not a good method. So I have decided to get all the project updates and then process them locally. To get all the project updates, I have to send around 20 asynchronous request to server. So I am using this method now to test whether it works without any issue. But due to the error in page 5, I could not get rest of the project updates.

I will skype with you today to explain more about this issue.

@rumeshkumar
Copy link

All the maps are working fine now.

@rumeshkumar
Copy link

@lauraroverts I think this issue can be closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants