Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/structure/views/view/follow_node_updates/preview/page_1/ajax
StatusText: Service unavailable (with message)
ResponseText: Recoverable fatal error: Object of class stdClass could not be converted to string in DatabaseStatementBase->execute() (line 2168 of /var/www/includes/database/database.inc).
This happens when I tried the following field output code.
$tmp_user=user_load($data->users_flag_content_uid);
$data->is_member=false;
foreach ($data->field_og_group_ref as $tmp){
if ( og_is_member( $tmp['raw']['target_id'] , 'user', $tmp_user ) ) {
$data->is_member = true;
break;
}
}
dpm ($data);
Comments
Comment #1
TorreyToomajanian CreditAttribution: TorreyToomajanian commentedHave you had any luck solving this? I am getting the same error with a custom PHP field referenced in a PHP sort inside of a Search API View. My PHP field is doing a simple query of vote total coming from the Rate module, and the values are there. It took the patch from https://www.drupal.org/node/2259281 to get the sorting to actually sort in the correct order, but I am not getting this error if I try to use the search API filter in my view. I am running on version 7.x-1.0-alpha1 * using the following patches in conjunction with the one I just mentioned:
https://www.drupal.org/node/1140896
https://www.drupal.org/node/1721578
Any help would be appreciated, thanks!