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.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3159613-8.patch | 2.68 KB | divyesh19 |
Comments
Comment #2
salihcenap commentedAny solutions?
Comment #3
toomanynights commentedSame problem here. Hoping for a fix.
Comment #4
hlunsing commentedThe 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.
Comment #5
hlunsing commentedWhen 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.
Comment #6
hlunsing commentedComment #7
divyesh19Comment #8
divyesh19Attached 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.
Comment #9
meet_bhanvadia commentedPatch #8 works. Can we please get this merged
Comment #11
suzymasriMerged and released in 1.0-beta8, thanks all!