We are running a multilingual site and the pathprocessor which Search API Page implements is a bit too aggressive.
src/PathProcessor/PathProcessorSearchApiPage::processOutbound(.....) checks if we are on a search api page, this is true in our case and we also have language as an option - all systems go according to the function. This leads the processor to think that the url should be changed so $node->url() returns "/path/to/search" instead of "/node/123".
How to reproduce:
1. Run latest version (not present in the previous alpha-release)
2. Call $node->url() while browsing a search-page.
Using \Drupal\Core\Url::fromRoute('entity.node.canonical', ['node' => $node->id()]) returns correct url.
Comment | File | Size | Author |
---|---|---|---|
#2 | entity-urls-3061398-2.patch | 737 bytes | gun_dose |
|
Comments
Comment #2
gun_dose CreditAttribution: gun_dose at WBX Development commentedI have the same issue and this is patch to fix it.
Comment #3
dietr_ch CreditAttribution: dietr_ch as a volunteer commentedComment #4
StryKaizerPushing priority since this kinda breaks the search ;)
Had the same issue, patch fixes issue.
Comment #6
borisson_Committed and pushed, does this require a new release?
Comment #7
StryKaizerProlly yes
Comment #8
Spokje@borisson_ Absolutely yes.
This is one of those things a site-owner would rarely notice (who uses the front-end facing search pages on his/her own site...), so it can go unnoticed for quite a while. Until, of course, the 27th user complaint comes in and you go and look, because you can't really blame it on user error any more after so many complaints...