Closed jhpoelen closed 11 years ago
I checked the GloBI webservice, and this returns non-zero values.
For instance, on Nov 11, 2013 9:30 Pacific Time, http://trophicgraph.com:8080/info?source=http://gomexsi.tamucc.edu
returned :
{
"columns" : [ "number of studies", "number of interactions", "number of distinct source taxa (e.g. predators)", "number of distinct target taxa (e.g. prey)" ],
"data" : [ [ 49, 69584, 273, 1247 ] ]
}
Please do note that adding distinct predator and district prey is not accurate, because there might be species that are both predator and prey.
Long story short: The statistics were working for non-logged in users, but not for logged in users. Now it works for both.
The long story: AJAX calls made through the WordPress AJAX manager must be specified as either privileged (logged in) or non-privileged (not logged in). I didn't realize that making the AJAX call non-privileged meant that it will NOT work for a logged in user. Now I have an action in the WordPress AJAX manager for both privileged and non-privileged. (I'm writing this explanation so that if we add a similar feature somewhere down the road and encounter the same issue, we'll have a reminder.)
Reed
@reedhewitt thanks for responding so quickly!
Thanks Reed, and it is now working for me!!!
Jim
From: Reed Hewitt [mailto:notifications@github.com] Sent: Tuesday, November 12, 2013 9:18 AM To: jhpoelen/gomexsi Subject: Re: [gomexsi] Statistics Reference, Unique Interactions, Total Interactions show up as zero (0), even through interactions are present (#80)
Long story short: The statistics were working for non-logged in users, but not for logged in users. Now it works for both.
The long story: AJAX calls made through the WordPress AJAX manager must be specified as either privileged (logged in) or non-privileged (not logged in). I didn't realize that making the AJAX call non-privileged meant that it will NOT work for a logged in user. Now I have an action in the WordPress AJAX manager for both privileged and non-privileged. (I'm writing this explanation so that if we add a similar feature somewhere down the road and encounter the same issue, we'll have a reminder.)
Reed
— Reply to this email directly or view it on GitHubhttps://github.com/jhpoelen/gomexsi/issues/80#issuecomment-28301438.
Steps to reproduce:
Expected: A non-empty list of references containing the gomexsi statistics.
Actual: All zeros for statistics. See attached screenshot .