Hello, in order to have the locale prefix at the beginning of the url instead of the end of the url, i have set in "admin/config/regional/language/detection/url" the part of the url that determines language by domain.
english: en.mysite.localhost
francais: fr.mysite.localhost
But when I try to delete a node: en.mysite.localhost/node/7/delete
I have an issue and the current error: “Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it.”
Someone knows how to work around the problem?
I have tried to edit the settings.php and set trusted_host_patterns to ['.*'] but not working.
Thanks in advance for your help.
Comments
Comment #2
Roberto d9 commentedComment #3
avpadernoComment #5
johnzzonOne of our clients encountered this last week. Their setup also involves different domains for different languages.
I could reproduce it locally by using en.localhost, fi.localhost, dk.localhost, etc.
So I went into the code with Xdebug. What happens is that when you delete a translated node, it redirects you to the node's default translation. In a setup with different domains this means that it tries to redirect you to another domain, which is not a "SecuredRedirectResponse". This check is in
\Drupal\Core\EventSubscriber\RedirectResponseSubscriber::checkRedirectUrlThe node is deleted just fine, just that the redirect triggers an error.
I made sure that it's reproducible using only core. It's reproducible with the standard profile installation.
Steps to reproduce:
Comment #6
johnzzonAdding related issue I finally found after searching some more.
Comment #7
undersound3 commented