Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've installed and enabled the entire Socrata Project (7.x-1.0). I'm able to add sources and display them without issue. However, when I try to create a view from a source or a Socrata Catalog Search view, I always get a 500 error on Save & Exit or Save & Continue. I've checked the Watchdog log and haven't found anything related to the problem.
Comments
Comment #2
PapaGrande@stanimal What endpoint(s) are you using? That will help me to reproduce your error.
Comment #3
stancsmith@gmail.com CreditAttribution: stancsmith@gmail.com commented@PapaGrande,
The endpoint I'm using is: https://data.seattle.gov/resource/uanm-dxsk.json (which is the example given in the documentation).
Comment #4
PapaGrande@stanimal, I can't reproduce the error. I was able to create a Socrata view with the endpoint and a catalog search view as well using the current version of the module. Some more questions:
Comment #5
stancsmith@gmail.com CreditAttribution: stancsmith@gmail.com commentedComment #6
stancsmith@gmail.com CreditAttribution: stancsmith@gmail.com commentedSo looking through the logs I found this error right around the time I was trying to create the view:
[Thu Jul 14 16:11:48.115659 2016] [:error] [pid 2387] [client 204.124.228.83:64061] PHP Fatal error: Call to a member function validate() on a non-object in /var/www/ns/profiles/openpublic/modules/contrib/views/plugins/views_plugin_display.inc on line 2744, referer: http://dev.oursite.com/admin/structure/views/add
Comment #7
arh1 CreditAttribution: arh1 commented@stanimal, one thing I notice in "socrata view creation that leads to 500 error.png" is that you're given a row plugin option, and you have a value of "Fields" selected (after "Display Format: " "Unformatted List"). Socrata views should not give you that option... Do you see a "Full posts" value? What happens if you select that value instead of "Fields"?
Comment #8
stancsmith@gmail.com CreditAttribution: stancsmith@gmail.com commented@arh1, that did the trick! I can now create a socrata catalog search or a custom socrata source view. Chose "Panel Fields" instead of "Fields" and now the views show up. I've uploaded screenshots of them just to make sure that they look normal.
Don't see a "Full posts" value in that dropdown, and didn't when I changed the Display Format option. It was always either Fields or Panel Fields.
Comment #9
arh1 CreditAttribution: arh1 commentedGlad we're making progress but I'm not sure we're out of the woods yet... I hadn't tried the Socrata module with Panels yet. I see that when you enable Panels, the row style options when creating views are indeed "Fields" and "Panel fields". (I never use the "Panel fields" style but from what I understand it's not appropriate here.)
However, I'm able to create both SODA2 (standard endpoint) and Catalog Search views, using either row style, without error. So I think you'll need to troubleshoot by disabling modules until we can pinpoint what combination is causing the error.
I am curious if, when you create your view with the "Panel fields" style, you are able to select "Fields" under Format -> Show, and then add/remove fields under the Fields heading below -- generally getting the view output to be what you want?
Comment #10
stancsmith@gmail.com CreditAttribution: stancsmith@gmail.com commented@arh1, I am able to change the view style to fields under the Format/Show section and then add/remove fields without issue.
Testing the enabling/disabling of each module to see if it impacts Socrata will take some time. As I mentioned before, this site has around 260 enabled modules.
Comment #11
arh1 CreditAttribution: arh1 commentedYep, that's understandable, @stanimal. It sounds like you have a path forward, at least, and if you want to track down the root cause at some point just update this issue or create a new one.