On Drupal 9.0.2, the module is not usable although it states 'This release adds support for Drupal 9".

First, after enabled, there is not configuration item at the Configuration page > Search and Metadata.
Second, at Structure > Block, if you "Place block" and choose the "Custom Search form", there is no action after clicked. No block will be added.

Comments

metakel created an issue. See original summary.

salihcenap’s picture

Any solutions?

toomanynights’s picture

Same problem here. Hoping for a fix.

hlunsing’s picture

StatusFileSize
new1.81 KB

The problem is that in CustomSearchBlock.php the method \Drupal::service('file_system')->uriScheme() is used, although this method in Drupal 9 is replaced by \Drupal::service('stream_wrapper_manager')->getScheme(). After replacing these deprecated calls to uriScheme the Custom search form will show for configuring after which the block will be added. A patch file is attached to this message.

hlunsing’s picture

StatusFileSize
new2.36 KB

When using a search image another problem turns up: StreamWrapperManagerInterface::getTarget() cannot be called. This has to be replaced by a call of \Drupal::service('stream_wrapper_manager')->getTarget(). A new patch file, including the patches with respect tot the uriScheme() call, is attached to this message.

hlunsing’s picture

divyesh19’s picture

Version: 8.x-1.0-beta7 » 8.x-1.x-dev
Priority: Normal » Major
divyesh19’s picture

Status: Active » Needs review
StatusFileSize
new2.68 KB

Attached patch fixes the module for use in drupal 9.
It fixes both the issues mentioned above: deprecated uriScheme() and use of StreamWrapperManager instead of StreamWrapperManagerInterface which caused issue searching image.

meet_bhanvadia’s picture

Status: Needs review » Reviewed & tested by the community

Patch #8 works. Can we please get this merged

  • divyesh19 authored 9d76fc9 on 8.x-1.x
    Issue #3159613 by hlunsing, divyesh19: Not working in Drupal 9
    
suzymasri’s picture

Status: Reviewed & tested by the community » Fixed

Merged and released in 1.0-beta8, thanks all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.