- π¬π§United Kingdom catch
Retitling however I'm not sure this is the right place to do this.
Does the
Url
class not handle this already for example using ::fromUri() and then ::toString()?
In AliasManager.php
on lines 198, 231 and 248 (Drupal 8.1.1 src -- line numbers might differ in other versions), there's return $path
.
This happens in certain cases, for example, if the path has no alias, or if the path is not in the whitelist. While this is OK, the path returned doesn't contain the current language, or the language passed in by parameter to the method.
As a result, calling:
\Drupal::service('path.alias_manager')->getAliasByPath('/taxonomy/term/1', 'fr');
results in an URL like:
/taxonomy/term/1
while the correct path should be:
/fr/taxonomy/term/1
(assuming there is no alias created for that path)
Postponed: needs info
11.0 π₯
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Retitling however I'm not sure this is the right place to do this.
Does the Url
class not handle this already for example using ::fromUri() and then ::toString()?