Search 404 does not yield the results entered after the URL

Created on 27 October 2017, over 7 years ago
Updated 1 February 2025, 2 months ago

Installed module search404 8.x-1.x-dev on the site and configured it with the following configurations:

  1. Jump directly to the search result when there is only one result
  2. Jump directly to the first search result even when there are multiple results
  3. Use a 301 Redirect instead of 302 Redirect
  4. Disable error message
  5. Use auto-detection of keywords from search engine referer

Enabling the "Use auto-detection of keywords from search engine referer" configuration and entering the keywords after the site's URL, prompts the following error on the page:

Notice: Undefined index: HTTP_REFERER in Drupal\search404\Controller\Search404Controller->search404SearchEngineQuery() (line 265 of modules/contrib/search404/src/Controller/Search404Controller.php).

So I unchecked the "Use auto-detection of keywords from search engine referer" configuration and reentered the keywords after the site's URL. The module does not yield the results for the keywords entered after the site's URL. Page not found error persists. The search used by the site is Apache Solr search. Drupal version used is 8.3.1.

Tried various other configurations of the module. No results are obtained.

E.g. If the URL consists of "www.sitename.com/visit us", the results obtained should be the contents having "visit" and "us" keywords in them. If there is a single content matching the search then the module should redirect to the content's page which does not happen.

If the configuration " Do a "Search" with custom path instead of a Drupal Search when a 404 occurs" is checked and a custom search path - 'search?search_api_fulltext=/@keys' is provided, results are obtained provided the @keys is a single word (e.g. @keys = 'visit'). If there is a single content containing the keyword, the module does not redirect to the content's page even if the configuration "Jump directly to the search result when there is only one result" is checked.
If multiple words are provided with space separated, the spaces get replaced by a hyphen ( - ) (e.g. 'visit us' is replaced by 'visit-us' ) and no results are obtained.

📌 Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇮🇳India babapooja

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024