Account created on 5 January 2017, almost 8 years ago
#

Merge Requests

Recent comments

🇧🇪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

🇧🇪Belgium wouter.h

This patch contains the existing patch + update the info.yml file for D10 compatibility.

Production build 0.71.5 2024