- Issue created by @almunnings
findMatchingRedirect does not resolve recursivly, if a redirect contains a fragment.
Create redirect:
/a -> /b#223
/b -> /c
$redirect = \Drupal::service('redirect.repository')->findMatchingRedirect('/a');
var_dump($redirect->getRedirectUrl()->toString());
Expected:
/c
Output
/b#223
Perhaps `findByRedirect` could strip out the fragment on the recursive check?
$generated_url = $uri->setOption('fragment', NULL)->toString(TRUE);
Which would resolve to:
/a -> /b
/b -> /c
TBA
NIL
NIL
NIL
Needs work
1.0
Code