Search Permalink issue with BuddyPress

With current version of BuddyPress 2.7.4; there is an issue with the Search Permalink. Normally, when you turn on Permalink with Postname structure, the search URL would be /search/keyword (instead of ?s=keyword). This link should work.

However, when installing BuddyPress, that link will redirect you to the Home page. This issue has been tested with a fresh install of WordPress with only BuddyPress installed. Searching a solution via Google at this time does not give an answer. So, the only way is to turn off the permalink for search (which is currently using for Advanced Search Form). To do it, add this code to functions.php of your theme (or child theme, which is better).

add_filter('search_link', 'videoporo_search_link_structure', 10, 2);

function videoporo_search_link_structure( $link, $search ) {

$link = home_url('?s=' . urlencode($search) );

return $link;