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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stanimal created an issue. See original summary.

PapaGrande’s picture

Assigned: Unassigned » PapaGrande

@stanimal What endpoint(s) are you using? That will help me to reproduce your error.

stancsmith@gmail.com’s picture

@PapaGrande,

The endpoint I'm using is: https://data.seattle.gov/resource/uanm-dxsk.json (which is the example given in the documentation).

PapaGrande’s picture

@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:

  1. Can you create other views without error?
  2. What other modules do you have enabled?
  3. Do you have access to the web server logs to see if there are any PHP errors?
stancsmith@gmail.com’s picture

  1. I just created another view with no issues
  2. I have 260 enabled modules. I can give you a list of them if you'd like.
  3. I don't have access to the PHP logs personally, but I can get them from our host.
stancsmith@gmail.com’s picture

So 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

arh1’s picture

@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"?

stancsmith@gmail.com’s picture

@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.

arh1’s picture

Status: Active » Postponed (maintainer needs more info)

Glad 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?

stancsmith@gmail.com’s picture

@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.

arh1’s picture

Yep, 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.