After enabling global redirect and setting it automatically redirect old aliases to the new, change a node's url from (original) to (something else). Then, change the node's url back to (original). Infinite loop warning appears on node access.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 1936820-redirect-ignores-old-alias-7.patch | 461 bytes | das-peter |
| #6 | 1936820-redirect-ignores-old-alias-6.patch | 460 bytes | douglasmiller |
| #3 | 1936820-redirect-ignores-old-alias-3.patch | 432 bytes | douglasmiller |
| #1 | redirect.patch | 492 bytes | impleri |
Comments
Comment #1
impleri commentedWhoops, put this in the wrong project. Now with a patch.
Comment #3
douglasmiller commentedRerolling the above patch against the latest 7.x-1.x HEAD.
Comment #4
deviantintegral commentedThis patch does fix the issue of showing the dsm() to users. However, you still end up with an extra redirect that matches the path alias. Does it make sense to delete any redirects that match a path alias when updating an entity?
Comment #5
impleri commentedI'm not sure I understand your question. What is this extra redirect that you are speaking about? The patch deletes any existing redirects to the actually existing path alias. It seems reasonable to ensure that new nodes are not redirected to old path aliases (e.g. I create a node at /some/path, then update it to be /different/path with auto-redirect coming in to push /some/path to /different/path. Then, I create a new node at /some/path. Either /some/path should go to the new node -- which this patch makes possible -- or /some/path should not be allowed as an alias and its redirect to /different/path remains until I remove it).
Comment #6
douglasmiller commentedThe previous version of the patch did not take the language into account. This was preventing redirects from being deleted if any language settings were in use.
Comment #7
das-peter commented#6 works like a charm.
Only nitpicky thing:
Code sniffer reports:
407 | ERROR | Inline comments must start with a capital letter
407 | ERROR | Inline comments must end in full-stops, exclamation marks, or question marks
I've adjusted that and say RTBC.
Comment #8
hanoiiPossibly related to #1796596: Fix and prevent circular redirects, I believe the other one is probably a duplicate of this one, just noting it here for reference.
Comment #9
owen barton commented#1796596: Fix and prevent circular redirects was here first, and the patch is quite a bit further along (it handles existing aliases, and also includes tests), so marking this one as duplicate.