Forum

Thread tagged as: Error

Hiding extensions and default doc in search results not applied

Running Perch: 2.8.23, PHP: 5.6.10

When outputting search results, 'hide-extensions' and 'hide-default-doc' only get applied if the option 'no-conflict' is set to true. This is due to the statement in PerchContent.class.php where the result_url is first updated to match the above options, but is then overwritten if 'no-conflict' isn't set.

At line 805:

// compat
if (!$opts['no-conflict']) {
    $row['url'] = $row['result_url'];
    if (isset($row['result_result_url'])) $row['result_url'] = $row['result_result_url']; //Formatted URL gets replaced
}
Chris Davis

Chris Davis 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Certainly looks like a bug - we'll get onto it. Thanks!