Closed (fixed)
Project:
Services Views
Version:
7.x-1.0-beta2
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2012 at 03:48 UTC
Updated:
29 Mar 2013 at 14:42 UTC
Jump to comment: Most recent file
Comments
Comment #1
tinflute commentedI am getting this error (in version 6.x) when i attempt to create a node by sending json
array to create the node. If I don't send anything, then I get the list of nodes working.
To diagnose the problem, you should check you apache log, possibly at /var/log/apache2/error.log
Replicate the problem, then look at the last few lines in the error log.
The relevant line on mine is
Comment #2
ygerasimov commented@Irous please advise some information about your view? Clear caches and advise how to reproduce the problem so I can take a look at it.
Comment #3
irous commentedOk, I've gone through my services display view and gradually stripped everything down (filters, fields etc) and saved/tested each and every time, and then tested to see if the 500 (Internal Server Error) changed..
Well, it did. It went away when I removed the field Content: Company (which is a taxonomy_vocabulary field) that I had in there.
With another test, I did the same stripping process again - instead this time, I removed the Content: Company field first. I still got the 500 (Internal Server Error), so there was another field that was causing problems. That field turned out to be a Link (widget) field.
Comment #4
irous commentedIt looks like this error was also caused because I didn't have labels in my fields! I've put them in again and it's working fine now!
Comment #5
axle_foley00 commentedI'm experiencing this error also in the D6 version. It seems this error is being caused by Date fields that I have in some of my views. I am using labels but am still experiencing this 500 (Internal Server Error).
Comment #6
axle_foley00 commentedI noticed the following error in my logs when I try to add a date field to my view:
PHP Fatal error: Cannot pass parameter 1 by reference in /path/to/drupal/sites/all/modules/services_views/services_views.resource.inc on line 81Line 81 of services_views.resource.inc corresponds to:
$field->pre_render(array($row));Comment #7
Mat77 commentedHi everyone,
Just faced the same issue, and I think I found where it came from: labels are mandatory!!
Here is the test I did:
I called my views through a webservice call and got it working: I receive my view results (as an array, because I configured it to).
I edited my view, and disabled the label for the title field. Now the WS returns : Error 500 !
Here is the related error:
I don't think it would be hard to make a fix for this, I'll try and come back here if I find a nice patch.
Matt
Comment #8
Mat77 commentedHi again,
Yeah the patch was pretty simple, just checking that the label value isn't empty.
I don't get how to put the patch with git (looks quite long), so I'm posting it here.
Basically, you just need to change on line 130 :
if (isset($field->options['label'])) {By
if (isset($field->options['label']) && $field->options['label'] != "" ) {Comment #9
ygerasimov commentedThanks @Mat77. I have committed patch #8.
Please remember to remove windows trailing spaces in your patch next time.
Comment #10
axle_foley00 commentedHas this patch (or similar) been applied to the D6 version of the module?
Comment #11
ygerasimov commentedNo. D6 does not have this functionality (services display in views). So patch has not been applied.
Comment #12
axle_foley00 commentedIs there a solution for the D6 version? I had shared an error I was receiving in comment #6. Hopefully that could help with troubleshooting and a possible solution for D6 users.
Comment #14
ianmen commentedDid anyone had fix for this issue in Drupal 6 ? Having the same trouble with a date field.
Comment #14.0
ianmen commentedremoved angled brackets