Postponed (maintainer needs more info)
Project:
Sunlight Congressional Districts (with optional CiviCRM integration)
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Jan 2013 at 22:12 UTC
Updated:
10 May 2013 at 17:08 UTC
Comments
Comment #1
dalinAll data comes from the Sunlight API, they in turn scrape data from various Government websites. The Sunlight API was serving data from the 113th Congress at the beginning of the year:
https://groups.google.com/forum/?fromgroups=#!topic/sunlightlabs/Kuu-Ng9...
I've done a few searches on my primary install of CD Sunlight module and it is returning the expected data.
If there's something in particular about your installation that is not showing updated data you'll need to be more specific.
Comment #2
m.e. commentedMy site is not showing the new Congresspeople. One example would be the search (views) page at http://www.secularcensus.us/congress Searching for a female Dem from Arizona should give Kyrsten Sinema, but does not.
Comment #3
dalinOn another site I ran that search and I do see Kyrsten Sinema. Check your logs to ensure that cron is running and completes successfully. Also check the status report for any issues. And visit /admin/settings/cd_sunlight to see if your key is valid.
Comment #4
m.e. commentedThank you. The key is valid, but I am seeing log messages to the effect of "A connection cannot be made to Sunlight, cd_sunlight_cron will not be run." and "A connection cannot be made to Sunlight, cd_civicrm_cron will not be run." What else would cause this?
Comment #5
dalinThis is the test function that is being called:
http://drupalcode.org/project/cd_sunlight.git/blob/refs/heads/7.x-1.x:/c...
It basically sends a request to Sunlight to find out what districts are in zip code 94111. Sunlight should return a California district.
This is probably failing either because your key is not correct, or because your server cannot contact the outside world. This could be for any number of reasons, most likely firewall related. As a test you could try querying the API directly from the commandline to see what you get:
curl "http://services.sunlightlabs.com/api/districts.getDistrictsFromZip.json?... key]"
Comment #6
m.e. commentedServer admin says I need to use GET instead - curl disabled for security reasons. I've done the GET command and receive the error "Invalid API Key." However, the key in my Sunlight account is exactly what I've specified in admin/config/services/cd_sunlight and I've double-checked the GET for accuracy.
Comment #7
m.e. commentedJust getting back to this. Support tech has done the CURL command for me and it works fine. Yet my site is still not connecting to Sunlight - I still get errors in the cron log (as above). I've tried creating a new Sunlight key just in case, and CURL works for that too, but the config screen will not let me change to the new key: "Either the Sunlight key is not valid, or the Sunlight API is down. See watchdog for more detailed information." (I have definitely validated the new key.) Still stuck - any ideas?
Comment #8
dalinNo sorry.
I think your going to have to dig deeper into the code.
Comment #9
m.e. commentedYour code or some other part of Drupal? This worked for over a year for me - I am mystified why it no longer does.
Comment #10
dalinOne place to start might be to place
var_export($response); die();after this line:http://drupalcode.org/project/cd_sunlight.git/blob/refs/heads/7.x-1.x:/c...
Perhaps there's something blocking PHP from accessing Sunlight (even though curl CLI works).