-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty redirects created when using CustomUrls #54
Comments
Fixed correctly using the "redirector.track_uri_updates" setting. This will be available in the next update btw. |
Thanks for the fix! As far as the other issue is concerned: When redirects are created automatically on change of an alias, the target is always a dynamic URL for me (i.e. [[~id]]). I thought this was intended. The empty-pattern-redirects could also have to do with the Custom Urls Extra, which I'm using to rewrite the aliases for resources in my collections. Maybe |
Try it with temporary disabling the Custom URLs plugin. When it works by then, you know it ;-) |
Yeah, it definitely has to do with CustomUrls. Do you have any idea how to fix this, so the plugins don't interact badly with each other? (I considered changing the plugin priority of one of them, but it's not clear to me which one should run first to avoid any issues.) |
Yeah that's definitely the way to fix it I guess. |
If Redirector runs first, however, the alias change triggered by CustomUrls (which generated the alias based on the title in my case) will not be reflected in the Redirector rule. The optimal order would be:
I guess this is not possible? Therefore, it's probably better if CustomUrls runs first. Couldn't you still work around the issue with empty patterns by just checking whether the old URL is empty? There is no case where rules with empty patterns make any sense, right? So just skip creating the rule in such a case. |
Basically that's what is happening.. Redirector plugin also runs OnDocFormRender to store the current URL. When that one is changed against the new one (at save) it will create a rule. |
This is still an issue which is slightly annoying, because I have to delete a bunch of empty redirect rules every once in a while. |
Whenever I create a new resource in one of my collections (see Collections Extra), Redirector creates an empty redirect to that resource, i.e. the pattern is empty and the target is [[~id]] where id is the ID of the newly created resource. This happens even though redirector.track_uri_updates is turned off.
I'm using Redirector 2.0.6.
The text was updated successfully, but these errors were encountered: