Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 301012

Use TrustedRedirectResponse Error on Multilingual Setup

$
0
0

I received the following error while setting up a multilingual website:

Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it.

Here is the sequence to create this error:

  • Install new 8.0.1 website using English
  • Enable Language Translation and Language Modules
  • Allow Trusted Hosts: localhost, www.localhost& es.localhost in settings.php
  • Add Spanish language
  • Set Detection & selection > Domain to www for English and es for Spanish & Save Configuration

I've done this several times in beta.

As a side note. On the "Detection & selection" screen, the user is entering "sub-domains" not "Domains" as the screen says. In this example: Example: Specifying "de.example.com" as language domain for German will result in an URL like "http://de.example.com/contact"., de is a sub-domain of example.com/. This screen should likely be changed.


Viewing all articles
Browse latest Browse all 301012

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>