My "Services" display view, which I access via:

http://example.com/(endpoint path)/(resource name)

..used to work, but with the recent update, all I get is a 500 (Internal Server Error) . Is this happening for anyone else?

CommentFileSizeAuthor
#8 labelPatch.patch403 bytesMat77

Comments

tinflute’s picture

I 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

PHP Fatal error:  Cannot unset string offsets in /var/www/mysite/profiles/openatrium/modules/contrib/cck/includes/content.node_form.inc on line 60
ygerasimov’s picture

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

irous’s picture

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

irous’s picture

Status: Active » Closed (fixed)

It 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!

axle_foley00’s picture

I'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).

axle_foley00’s picture

Status: Closed (fixed) » Active

I 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 81

Line 81 of services_views.resource.inc corresponds to:

$field->pre_render(array($row));

Mat77’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta2
Priority: Normal » Major

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

[Wed Nov 14 18:17:54 2012] [error] [client 192.168.1.185] PHP Fatal error:  Cannot access empty property in /var/www/html/drupal/sites/all/modules/services_views/services_views.resource.inc on line 137
[Wed Nov 14 18:17:54 2012] [error] [client 192.168.1.189] XML-RPC: xmlrpcmsg::parseResponseHeaders: HTTP error, got response: HTTP/1.0 500 Internal Server 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

Mat77’s picture

StatusFileSize
new403 bytes

Hi 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'] != "" ) {

ygerasimov’s picture

Status: Active » Fixed

Thanks @Mat77. I have committed patch #8.

Please remember to remove windows trailing spaces in your patch next time.

axle_foley00’s picture

Has this patch (or similar) been applied to the D6 version of the module?

ygerasimov’s picture

No. D6 does not have this functionality (services display in views). So patch has not been applied.

axle_foley00’s picture

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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ianmen’s picture

Did anyone had fix for this issue in Drupal 6 ? Having the same trouble with a date field.

ianmen’s picture

Issue summary: View changes

removed angled brackets