When retrieving nodes with a "fields" argument, the services_resource_build_index_query function in services.module throws an error as it attempts to split the fields string into an array after already having done it.

Line 470:
$fields = explode(',', $fields); // This splits the $fields string into an array
$query->fields('t', $explode(',', $fields)); // This line errors as we attempt to split the fields array again

CommentFileSizeAuthor
#1 index-failure-1144890.patch7.55 KBmarcingy

Comments

marcingy’s picture

Version: 7.x-3.0-rc2 » 7.x-3.x-dev
Status: Active » Needs review
StatusFileSize
new7.55 KB

Setting to head. Thanks for this, patch to fix the issue and also to improve the tests so as they actually pick this issue up.

Attached patch fixes the bug deleted here, adds tests to check fields and tidies up default values for parameters in index queries.

kylebrowning’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Status: Needs review » Patch (to be ported)
kylebrowning’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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