I'm using Drupal 7 : with Search API
In this I'm using the token [search-api-saved-search-result:url] which I take it should output the Url of the relevant nodes. The Urls are correct except the have 'cron.php' text in them . ie 'www.example.com/cron.php/node/1234' ; making them not work.
this is the code in the Search API module.
case 'search-api-saved-search-result':
$d = $data['search_api_saved_search_result_info'];
if (!empty($d['search']) && !empty($d['entity'])) {
$search = $d['search'];
$index = $search->index();
$item = $d['entity'];
foreach ($tokens as $name => $original) {
if ($name == 'id' && ($id = $index->datasource()->getItemId($item))) {
$replacements[$original] = $id;
}
elseif ($name == 'label' && ($label = $index->datasource()->getItemLabel($item))) {
$replacements[$original] = $label;
}
elseif ($name == 'url' && ($url = $index->datasource()->getItemUrl($item))) {
$url['options'] += $url_options;
$replacements[$original] = url($url['path'], $url['options']); // $replacements[$original] = url('http://www.rcnbulletins.com/', $url['options']);
}
}
if (($url_tokens = token_find_with_prefix($tokens, 'url')) && ($url = $index->datasource()->getItemUrl($item))) {
$replacements += token_generate('url', $url_tokens, $url, $options);
}
}
break;
I'm wondering if this is a bug or something i've missed in admin.