When retrieving a view, only the native fields can be reached. If a non native field is added to the view, it replaces the nid of the current node, and is not added to the data result.

Steps to reproduce:
- Install services_views module and all its dependencies
- Create a rest server with permission to retrieve views
- Create a view referencing a content type, and add a custom field to the fields section.
- Retrieve the view using a http request.

The nid will be replaced by the content of the custom field in each node returned.

Comments

sunnyuff’s picture

Priority: Major » Critical

If you add global php field (views_php) to the view you wants to retrieve through services, it will return blank result.

Error Logs shows this error :
"Notice: Undefined property: stdClass::$views_php_8 in views_php_handler_field->render() (line 223 of /home/sunny/htdocs/sapis/sites/all/modules/contrib/views_php/plugins/views/views_php_handler_field.inc)."

yogeshchaugule8’s picture

Hi,

I was having same issue, when I've added a label to custom fields they've started coming in my services output.

Yogesh

arnaud.dabouis’s picture

I tested your solution and it works. Thanks.

kylebrowning’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)
internal’s picture

Version: 7.x-1.0-beta2 » 7.x-1.1
Component: Code » Documentation
Status: Closed (cannot reproduce) » Active

I reproduce this symptom with latest 1.1. The value of nid will be overwritten by the value of custom field, such as my_custom_title. The solution is to specify Custom value key in field configuration. If it's by design. It should be bold documented. Thanks.