Search Page

Expected behaviour

url: example.com/search
breadcrumb: home>>search

Actual behaviour

url: example.com/search/node
breadcrumb: home>>search>>search

Search help page

Expected behaviour

url: example.com/search/help
breadcrumb: home>>search>>help

Actual behaviour

url: example.com/search/node/help
breadcrumb: home>>search>>search>>search

Comments

Not Real created an issue. See original summary.

eli-t’s picture

saesa’s picture

I think you should create a view called search. You can Implements hook_preprocess_breadcrumb() to modify the breadcrumb but not to change the url.

saesa’s picture

You have to modify this view, that is already created.
When you search in this view the breadcrumb is Home> Search.
view
example search

saesa’s picture

And also change the current search block to an exposed block from the previous view.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

jhodgdon’s picture

Title: Search breadcrumbs and url » Search breadcrumbs have duplicate entry for Search in them
Component: Umami demo » search.module

This problem with the breadcrumbs is actually in the Search module, not Umami theme.

The URL is correct, but the breadcrumbs are not.

jhodgdon’s picture

Two things:

a) Let me clarify about the URL.

If you are using the core Search module, the URL of each configured search page will be example.com/search/whatever_you_decide

So the Umami demo could choose a different suffix for the content search page. The default suffix of "node" comes from
core/modules/node/config/optional/search.page.node_search.yml

The Umami demo could have its own copy of this config file and change the "path" component to something like "content" so the URL would be example.com/search/content. It is not possible in the core Search module to make the path be just example.com/search, although if you go to that URL you will also get to the default search page, which will be the content search page.

We could also fix this in the core/modules/node config, which I think would be a good idea.

b) The breadcrumbs.

The breadcrumbs are:

1. On the search page itself, whether you are on example.com/search/node or example.com/search/user:
Home (points to example.com)
Search (points to example.com/search)

2. On the search help page:
Home (points to example.com)
Search (points to example.com/search)
Search (points to example.com/search/node or example.com/search/user, depending on if you are on the content or user search help page)

So the first "Search" breadcrumb is actually not incorrect. But the second one should have a different title -- either Content or User, so that if you are on the content search help page the breadcrumb would be Home > Search > Content, and on the user search help page it would be Home > Search > Users -- these would match the tabs shown on the Search page if you are logged in with permission to search both content and users.

c) The breadcrumb behavior described in (b) is the default behavior. However, in Umami it is even worse, because for some reason Umami adds another layer to the breadcrumbs.

So if you are on the search page and have not yet searched, the breadcrumb is
Home (points to example.com)
Search (points to example.com/search)
Search (not linked, same as page title)

And if you have done a search, it is:
Home (points to example.com)
Search (points to example.com/search)
Search for whatever you entered (not linked, same as page title)

And on the search help page it is:
Home (points to example.com)
Search (points to example.com/search)
Search (points to example.com/search/node or example.com/search/user, depending on if you are on the content or user search help page)
Search (not linked, and not the same as the page title for some reason -- the page title is currently Search help although that will be changing on #3086795: "Search help" link in search form is ambiguous and confusing)

So, this is a bug in both the core Search module and the Umami Demo profile.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

lendude’s picture

Issue tags: +Bug Smash Initiative

Since the breadcrumb is probably build up from the titles, this might be overlapping with #3076748: In D8 Search page titles are not rendered from the provided label value wherein D7 it is working fine, didn't dig too deep.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Status: Active » Postponed

The Search Module was approved for removal in #3476883: [Policy, no patch] Move Search module to contrib .

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3565780: [meta] Tasks to deprecate the Search module and the removal work in #3565783: [meta] Tasks to remove the Search module.

Search will be moved to a contributed project before Drupal 12.0.0 is released.