Problem with displaying fields using Views


My goal is to use Search API so that I can create a custom search page using Views. I want to add the “rating” widget (rate module), but there is no way to include it in the Search API fields. Thus, I tried to fix it by adding custom field to Search API index.

function rate_entity_property_info_alter(&$info) {
  $info['node']['properties']['widget'] = array(
    'label' => t('Rating widget'),
    'description' => t('Rating widget'),
    'getter callback' => 'display_widget',
function display_widget($node) {
     print rate_generate_widget('1', 'node', $node->nid);

However, I am getting AJAX error

and problems with displaying widgets.

Please can someone help me to solve this problem.


Drupal version: 


Leave a Reply