So the normalize_aliases option should redirect from a node internal path to an alias (if found) correct? I don't believe it's hitting, right now /node/123 will just pull up /node/123.

CommentFileSizeAuthor
#6 redirect-2820222.patch642 bytesdrupalninja99

Comments

drupalninja99 created an issue. See original summary.

caspervoogt’s picture

I also tried this and it did not redirect to the pretty URL alias of the node. Not really sure what "Normalize aliases" is meant to do. The description says "Will check if for the given path an alias exists or if the used alias is in correct case and will redirect to the appropriate alias form." but this does not really explain it. Should I assume this means that:

1. if the node has an alias, it will redirect from node/123 to /my-pretty-url?
2. If I access the node via some alternative case like /My-Pretty-URL, it would redirect to /my-pretty-url?

#1 is not working for me.
I don't know about #2 - have not tested for that.

drupalninja99’s picture

I am having the same issues as #1 and I am pretty sure that is what this feature does in D7

drupalninja99’s picture

I believe the logic is in redirectNormalizeAliases so something must be not working within that method.

drupalninja99’s picture

I noticed here that this is not triggering the correct url object even though the alias looks like it's correct.

if ($url = \Drupal::pathValidator()->getUrlIfValid($alias)) {
drupalninja99’s picture

StatusFileSize
new642 bytes

Added a patch which fixes the issue for me. Using 'Url::fromUserInput' is more reliable for me than getUrlIfValid.

Mike_info’s picture

I am also experiencing the issue of getting redirected too often en not being able to visit the alias of the node when logged in. This happens only when I check the Normalize aliasescheckbox

berdir’s picture

Status: Active » Postponed (maintainer needs more info)
berdir’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Closing, this should be fixed now.