Active
Project:
Switch Page Theme
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Oct 2019 at 16:22 UTC
Updated:
27 Dec 2020 at 11:08 UTC
Jump to comment: Most recent
Hello,
when I use the fulltext field, in logs I get this error:
InvalidArgumentException : Source path https://mysite.com/page?search_api_fulltext=myword has to start with a slash. in Drupal\Core\Path\AliasManager->getAliasByPath() (line 186 de /srv/data/web/vhosts/myserver.com/htdocs/core/lib/Drupal/Core/Path/AliasManager.php).
Have you seen this error with a fulltext search?
thanks.
Comments
Comment #2
drunken monkeyHow do you have your search page set up?
And could you get the stack trace for that exception?
Comment #3
kumkum29 commentedHi drunken monkey,
sorry for the delay...
I get this error for all the searches in a fulltext search field.
The search page is built with view, and the fulltext search field is exposed in a block (exposed filters settings in the right column).
So, I'm displaying the block in a different region of the view.
In the logs, I see that the query is mentionned 2 times :
The Ajax option is enabled on the view.
Comment #4
drunken monkeyPlease try to get the stack trace for the error. It seems to be in a completely unrelated part of the site. So maybe something in the way the view is configured? (For instance, the view mode used?) It’s very hard to tell.
Is everything still working fine, as far as you can see? Is it just the error in the logs?
For getting the stack trace, try going to admin/config/development/logging and setting “ Error messages to display” to “All messages, with backtrace information”. Then, after triggering the error, it should be displayed on the page (maybe after refreshing the tab, if it’s just via an AJAX request), too.
Does it happen, too, if you deactivate AJAX?
Comment #5
oligerd commentedHi drunken monkey!
I also get this error when submit a fulltext search on a page with facets and a search field displayed in a block. The error appears in Recently logs and in the Web console.
Comment #6
drunken monkeyBased on the stack trace, this was triggered by the “Switch Page Theme” module. I don’t know that module, but maybe they assume something about the
RouteMatchobject that isn’t necessarily the case? Anyways, I’d start the investigation there.Another possibility is that the Facets module triggers the view execution in a way that causes problems in some scenarios. Seems even though only the view’s results are needed, an exposed form is constructed and it’s exactly that part that triggers the error. If Facets could avoid construction of the exposed form in some way, it would both prevent this error and save performance. (No idea whether that’s easily/cleanly possible, though.)