- πΈπͺSweden johnzzon Gothenburg πΈπͺ
One 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::checkRedirectUrl
The 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:
- Enable modules: Language and Content translation
- Configure a second language, eg. Swedish
- Configure Language > Detection and selection > URL to use Domain based, and add domains for each language
- Configure Content language and translation so that Basic page is translatable
- Create a node in English
- Translate the node to the second language
- Delete the second language's translation
- Encounter error: "Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it."
- πΈπͺSweden johnzzon Gothenburg πΈπͺ
Adding related issue I finally found after searching some more.
- Status changed to Closed: duplicate
7 months ago 11:16am 28 May 2024