When there is a redirect for the url, and it's an external url, it will fail with the exception ResourceNotFoundException() (in src/EventSubscriber/RouterPathTranslatorSubscriber.php) because the content can't be found in Drupal.

So instead of returning the target external url, an error is thrown.

CommentFileSizeAuthor
#2 3080088-allow-external-urls-2.patch1.11 KBbartvig

Comments

bartvig created an issue. See original summary.

bartvig’s picture

StatusFileSize
new1.11 KB

A simple solution is to check if the url is external and don't do more than return the resolved path and set status code to 200.

e0ipso’s picture

Status: Active » Needs review
e0ipso’s picture

Status: Needs review » Fixed
Thanks for contributing @bartvig! This module is better and more useful thanks to you. Open source maintainers need contributions like this to keep up. ❤️

  • e0ipso committed 89c3871 on 8.x-1.x authored by bartvig
    Issue #3080088 by bartvig: Redirect fails when it's an external url
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.