- Issue created by @wouter.h
- π§πͺBelgium wouter.h
My solution ensures that in the "strReplaceFirst" function it specifically searches for a URL alias that starts with a part instead of the first occurring part in the URL.
private function strReplaceFirst(string $search, string $replace, string $subject) { if(str_starts_with($subject, $search)) { $pos = strpos($subject, $search); if ($pos !== false) { return substr_replace($subject, $replace, $pos, strlen($search)); } } return $subject; }
After checking, I notice that it no longer replaces the news part of the "facets_pretty_paths" module, but the effective first part of the URL remains untranslated.
"/search/type/news" should be "/search/type/news"
After removing the "break;" in the "getOutboundPath" function everything works as expected
- Issue was unassigned.
- Status changed to Needs review
4 months ago 1:28pm 22 April 2025 - π³π΄Norway steinmb
I am guessing you would like some feedback on this patch from the maintainers. To make increase changes for it to be merged you should consider changing it to a MR (merge request).
- π§πͺBelgium tim-diels Belgium π§πͺ
Hi Wouter, thanks for the report and the patch. Could you see if π When there's a path that is a subpath of trans_path, the getOutboundPath function messes up paths from other places Active fixes the issue? If not, you can use it as base to create a test that fails and then a fix?
- Status changed to Needs work
22 days ago 7:48pm 23 July 2025 - π¨π¦Canada Liam Morland Ontario, CA π¨π¦
liam morland β made their first commit to this issueβs fork.
- @liam-morland opened merge request.
- π¨π¦Canada Liam Morland Ontario, CA π¨π¦
I created a merge request with the patch in #3.