Active
Project:
Services Search API
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2012 at 14:51 UTC
Updated:
2 Oct 2012 at 19:26 UTC
Firstly, thanks for the great module. You should really promote it to a full project.
I'm running into a funny bug. If I pass a value of $limit greater than 15, or certain values for $page (variable depending on result count) services returns the following error:
500 An error occurred: (0): Invalid data value given. Be sure it matches the required data type and format.
I've traced this to _services_search_api_callback(). When one of these 'wrong' values is passed, it enters this loop:
$fields = explode(',', $return_fields);
foreach ($fields as $field) {
...
If a $limit of 16 was passed, it would loop through this 15 times and then die. Not quite sure why. I'll be looking into, just wanted to put it on your radar.
Comments
Comment #1
grasmash commentedOk, I figured out the issue. This line:
Will fail if Search API's index still has a record of a node that has been deleted. This can happen if your index is only updated a few times a day.
Adding a local check for the node takes care of the issue, but it it may result in returning fewer results than expected. I.E., you may ask for 15 results, and Search API may return 15, but services_search_api will only return 14 (because it excludes a deleted node). Not too big of a deal, certainly better than an error.