Problem/Motivation

In drupal website we use multilanguage. There language is detected by path. We use domain setting so website has domain prefix.
When using drush command with host, Url::fromRoute returns absolute path and on top adds it with our given host. So we get incorrect url.

Steps to reproduce

To reproduce:
In website enable extra language.
Make language detection by url.
Select domain to determine language with language prefix.
Try drush commands.

Proposed resolution

In command, when making url with host dont use simply Url:fromRoute->toString() but change toString to getInternalPath, This way we make sure that url path from route name will be internal.

Comments

ugas19 created an issue. See original summary.

ugas19’s picture

cyoun’s picture

Status: Active » Fixed

This issue was resolved in version 1.2.0.

cyoun’s picture

Status: Fixed » Closed (fixed)