Document that URL redirects work from node/{nid} but not alias

Created on 21 October 2016, over 8 years ago
Updated 30 August 2023, over 1 year ago

It seems like it'd be worth documenting somewhere that redirecting from node/{nid} works even though redirecting from the associated alias does not.

It makes sense that URL aliases take precedence over URL redirects, but if you're trying to redirect from an existing node (useful because it allows entity references to that node on other pages), trying to redirect the alias feels like a dead-end with no fix (until you figure out you should use the node/{nid} route).

Did I just miss something?

πŸ“Œ Task
Status

Needs work

Version

1.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States j_shb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΊAustralia acbramley

    @Berdir I quite like this idea. Although it'd be nice to just be able to use aliases, this is a decent compromise.

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Based on the direction this is going in #22 and later, I think we can rename this issue to "Guide users who enter path aliases to use internal paths instead." I will also update the issue description to capture this.

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson
  • Pipeline finished with Failed
    2 months ago
    Total: 255s
    #411499
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson
  • Pipeline finished with Failed
    2 months ago
    Total: 449s
    #411600
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Creating a merge request for a new idea that I mentioned in the linked issue.

    Proof of concept for the UI, not functional yet:

    I've added the business logic for the functional bits. The test failure in the MR appears to be unrelated (it's also failing on 8.x-1.x)

    This is ready for functional/code review.

  • πŸ‡§πŸ‡ͺBelgium herved

    Coming from πŸ› Redirects from aliased paths aren't triggered Needs review
    I did some thinking back then on that issue (see comment #103 / #108) and I ended up with a similar conclusion to @berdir, which is that we should only inform/guide the user when they input aliases.
    Till now I was using the patch from #104, but the approach here seems like an it improves on it. So thank you for moving it forward.

  • Pipeline finished with Success
    20 days ago
    Total: 363s
    #447780
  • Pipeline finished with Success
    20 days ago
    Total: 210s
    #447793
  • πŸ‡§πŸ‡ͺBelgium herved

    Snapshot of current MR for composer

  • πŸ‡§πŸ‡ͺBelgium herved

    Ok my main question here relates to what should happen when we actually delete a node that has a redirect.

    From #2879648-103:

    For the node deletion problem:
    - when a path alias is deleted,
    - and a redirect for the source of the path alias exists
    - if the existing redirect language matches the path alias language being deleted, we update the redirect source to the path alias url
    - else if the existing redirect language == "und", we duplicate the redirect and set the redirect source and language according to the path alias being deleted.
    

    Say we have an EN /node/123 with alias /foo
    And a user created a redirect from /node/123 to /bar. At this point both /node/123 and /bar redirect to /foo.
    Shouldn't we do anything when the node (and so path alias) gets deleted? so we maintain /foo > /bar redirection?

  • πŸ‡ͺπŸ‡¨Ecuador jwilson3

    Huge +1 to comment #30, but doesn't that problem already exist today with or without the implementation here? For that reason, this should be split off to a follow-up, for its own discussion and implementation, independent of the scope of this issue.

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Agreed with #30 that what to do with deleted nodes should probably be kept out of scope, as this proposed change does not introduce that problem.

Production build 0.71.5 2024