Search stopped working

26 views
Skip to first unread message

gi...@shaw.ca

unread,
Apr 29, 2024, 2:35:38 PMApr 29
to islandora
We just had a user post some content and the Search function now gives an error..

The website encountered an unexpected error. Try again later.

The Drupal log states :

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "view.archive.page_1" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of /var/www/html/drupal/web/core/lib/Drupal/Core/Routing/RouteProvider.php).

Looks like a views-related error to me... Any suggestions would be appreciated.

Thanks


Rosie Le Faive

unread,
Apr 30, 2024, 8:06:46 AMApr 30
to islandora
Yes, it sounds like it's trying to show a particular view and failing. From the looks of "views.archive.page_1", it's looking for the view with machine name "archive" and trying to load the view display with machine name "page_1". The machine name of a view is set for good once you create the view, but the machine names of the displays are changeable in the Third Column ("Advanced") of the Views interface.

Weirdly, Drupal comes with a view called "Archive" (machine name "archive") which shows "All content, by month".  In the starter site, it's not enabled. You can start by seeing what view or views you might have with machine name "archive" (I don't think you can have more than one, but I am not sure if it only enforces that among enabled views).

I'm not sure what you might have going on that's calling the archive view. Perhaps, since you said you had a user post content, they have created Article or Page content (as opposed to repository content)? Perhaps the rendering of this Drupal content is causing the "archive" view to appear? If the view is not enabled then that would cause an error.

If that's the case, a solution could start by enabling the Archive view, then (if you want) turning off whatever's calling it.

Feel free to ping me on slack too if you want.

Rosie

Rosie Le Faive

unread,
Apr 30, 2024, 8:09:12 AMApr 30
to islandora
I neglected to mention that if your Archive view is enabled but you have renamed the view display machine name from "page_1" to something else then you'll need to either rename it back or fix whatever's calling the old machine name. 

gi...@shaw.ca

unread,
Apr 30, 2024, 1:41:10 PMApr 30
to islandora
Enabling the archive view made the error go away. You are on the right track.
However, the searches are now useless as no mater what I search for I get items broken down by month. 
Essentially, I get a listing of all content. I suppose that is the meaning of an archive.
The user created a content block called Footer description and added it to the Footer bottom region.
Yes, it looks like I will need to temporarily delete everything that is not repository content, disable archive view and try again.
Thanks R. You are priceless !

gi...@shaw.ca

unread,
Apr 30, 2024, 2:00:48 PMApr 30
to islandora
One last thing that fixed everything. 
The Search button had been reconfigured to bring up the archive search.
Reconfigured it back to show solr search and all is good.
Issue resolved. Thanks !
Reply all
Reply to author
Forward
0 new messages