SearchBlock plugins need to add in dependencies on the search page they submit to

Created on 9 October 2019, almost 5 years ago
Updated 30 January 2023, over 1 year ago

Problem/Motivation

Over in #2664830-213: Add search capability to help topics β†’ we discovered that search blocks don't have a dependency on the search page they submit to. This can cause problems when uninstalling modules.

Steps to reproduce:

a) Create and place a search form block that connects to a particular type of search page provided by a module that you can uninstall later, such as Help search if #2664830: Add search capability to help topics β†’ is installed and Help Topics module is turned on (or a testing module's page if you are writing a test). Visit the page where the block is placed and verify you can submit the search form.

b) Uninstall the module that provides the search page.

c) Visit the page with the block on it. You will get a White Screen of Death due to a routing exception, saying the route to the search page cannot be found.

Proposed resolution

Fix the plugin class to add the correct dependencies. This should make the block get deleted as part of the module uninstall.

Remaining tasks

Make a patch, including a test.

User interface changes

Search Form blocks connected to particular Search pages will be deleted when the search page is deleted, such as when the providing module is uninstalled.

API changes

None.

Data model changes

Search Form blocks will have a dependency on the configured search page.

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
SearchΒ  β†’

Last updated 5 days ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @pwolanin
Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

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.

  • The Needs Review Queue Bot β†’ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

Production build 0.71.5 2024