Hello,
I just updated Drupal in version 8.4 and Search 404 no longer works.
When I run a 404 search, the site displays :
The website encountered an unexpected error. Please try again later.
The log message is :
Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "search_page" entity type did not specify a "search" form class. in Drupal\Core\Entity\EntityTypeManager->getFormObject() (line 184 of /home/www.s1biose.com/public_html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php).
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | search_404_no_longer-2915329-15.patch | 947 bytes | akhilavnair |
| #13 | search_404_no_longer-2915329-13.patch | 971 bytes | anish.a |
Comments
Comment #2
jurgenhaasI'm having the same issue and I can't figure out what's wrong. The error is triggered by this call in Search404Controller::search404Page() line 157:
As a workaround I have just commented out that line and that gives me back the site in a working state.
Comment #3
jurgenhaasComment #4
zenimagine commentedThanks, I confirm that the patch works
Comment #5
jurgenhaasLet me just emphasize, this is not fixing the problem! It just avoids the error but it also doesn't render the form on top of the search page. So, this issue needs a real fix and the patch really only keeps the site up and running for now.
Comment #6
anybodyI can confirm this problem on all of our 8.4 installations.
Comment #7
cllamas commentedsame problem here
Comment #8
gmrmedia commentedAfter update core from 8.3 to 8.4 same problem.
Comment on the line marked by jurgenhaas works but turns off the search form.
Comment #9
jurgenhaasThere are more problems in that controller, e.g.
$plugin->setSearch($keys, $request->query->all(), $request->attributes->all());expects a string where it gets keys as an array. And a lot more small things.I'd be happy to contribute and help fixing that stuff, but it feels like this module is not really maintained. What is the status here?
Comment #10
anish.a commentedI am working on it to provide a fix now.
Comment #11
jurgenhaasThat's great news, thanks @anish.a
Comment #12
anish.a commentedComment #13
anish.a commentedThis fixes the issue.
Comment #14
anish.a commentedComment #15
akhilavnairHi,
I'm having the same issue.
@anish.a thanks for the patch. The patch from #13 works fine. But the patch contains double assignment,
$build['search_form'] = $build['search_form'] = .......I think this is not necessary, so if you don't mind, I have updated the patch.
Thank you.
Comment #16
anish.a commentedCan we just merge this?
Comment #17
gmrmedia commentedThis patch dosent work in my case. I still get this db log:
Comment #18
akhilavnairPatch from #15 works fine in Drupal version 8.4.0.
Comment #19
jurgenhaasConfirmed, #15 working fine here too. I don't see the issue from #17.
Comment #21
anoopjohn commentedPatch in #2915329-15: "Search 404" no longer works with "Drupal 8.4" has been committed to the dev branch
Comment #22
gmrmedia commentedMy mistake, i took file from repo and everything work fine on 8.4.
anish.a thank you for patch ;)
Comment #24
rgalaxy commentedHi guys, i have same problem and would like to fix it with the patch, but i dont really understand how to patch it? can anybody help me? does it needs to be written on drush?
Comment #25
anybodyJust install the latest version. No need for patches here anymore :) It has been commited.
Comment #26
rgalaxy commentedumm, is it possible to just update it from Drupal UI on my website? because i dont really understand if i really need to uninstall the late version and install the altest version on my production site :D Thank you btw !
Comment #27
gmrmedia commentedGo to: Reports > Available updates > update tab :) or read https://www.drupal.org/docs/user_guide/en/security-update-module.html
Comment #28
mlncn commentedJust a ping to the maintainers that a critical fix such as this warrants a beta3 release!
Comment #29
rgalaxy commentedthanks gmrmedia ! it was already up to date to the latest version on update tab. so i decided to ask my colleague and he helped me to patch it.