Uh oh!
There was an error while loading. Please reload this page.
Fix is_parent not working with redirect '@child' - #3058
Conversation
Tested with: - redirect_child > entry > entry - redirect_child > redirect_child > entry Why does this work? The uri() method gives the actual URL of the one entry, while the url() method gives the url() of the child in case of redirect child
jasonvarga
commented
Feb 2, 2021
This isn't quite the right solution. It needs to be the url to include any configured site subdirectory. The problem seems to be what you've discovered though. Looks like we'll need a way to get the url without following the redirect. |
andjsch
commented
Feb 2, 2021
Any suggestions then? In my use cases this solved the problem in all scenarios. I'd be eager to find out if it works for the others that commented on the issue as well. Don't think anybody tried though... |
andjsch
commented
Feb 2, 2021
Nevermind. I thought about it and do understand now. I'll fiddle around with it later this week and will add a method for getting the actual URL entry without following the redirect and use that instead. |
jasonvarga
commented
Feb 10, 2021
Closing this to keep organized. Feel free to open another PR. |
Fixes#2359
Why does this work?
The uri() method gives the actual URL of the entry, while the url() method gives the url() of the child in case of redirect child. This way, the isAncestorOf() method delivers correct results.