Fixed Route filter

JoyFreak

Well-known member
Affected version
2.0.10
I have noticed that when you add a route filter and visit the new url.. It works with a trailing slash at the end of the url but when you remove that trailing slash "/" it no longer works.

It seems to work for all default urls but not routed filter urls. Is this a bug or am I missing a setting?
It does not seem a huge deal but what if someone manually types the url in the browser and forgets to add the trailing slash, in that case, they will think the url is dead.
 
This was true in earlier versions of XF 2.0 but it is actually something we changed in 2.0.10.

On this demo, I've changed the Gallery route from media to gallery, and both links work:

http://016a44bdb0a8368e.demo-xenforo.com/2010/index.php?gallery/
http://016a44bdb0a8368e.demo-xenforo.com/2010/index.php?gallery

I think the common use case we were testing against was pages which had been changed with a route filter, and both of those work too:

http://016a44bdb0a8368e.demo-xenforo.com/2010/index.php?test/
http://016a44bdb0a8368e.demo-xenforo.com/2010/index.php?test

Can you re-test on 2.0.10 and provide the specific details of the route filter(s) and we'll try and reproduce it.
 
I can reproduce it with a similar route filter. We'll take another look at this.

However, for now, don't worry about it. I can guarantee, almost no one will ever manually type a URL into their browser. No one does that :)
 
Found another bug, wasn't sure if I should make a new thread but since it's related to route filters, I will stick in here.

I am trying to rename: https://www.gnonline.net/categories/pokémon.333/
But I think because the url has the "é" it doesn't want to work.

Edit: When I posted the url in here it converted the "é" to "%C3%A9" so I figured if I replaced the "é" with that, it will work and it did.

But if I hadn't posted the URL in here and discovered that, I would not have known.
 
It's worth noting that as of 2.0.10, the behavior here matched XF1's. If you replaced threads/123/ with some/thing/, it would only match if the trailing slash was included in the URL.

However, for 2.1, I'm experimenting with a change such that if both the from and to fields have a trailing slash, it will optionally match it. I believe this should generally be safe, but I would like it go through a bit more "normal" testing via the beta process as there could be some gotchas (particularly on certain routes which have slightly different behaviors).
 
Found another bug, wasn't sure if I should make a new thread but since it's related to route filters, I will stick in here.

I am trying to rename: https://www.gnonline.net/categories/pokémon.333/
But I think because the url has the "é" it doesn't want to work.

Edit: When I posted the url in here it converted the "é" to "%C3%A9" so I figured if I replaced the "é" with that, it will work and it did.

But if I hadn't posted the URL in here and discovered that, I would not have known.
Can you explain this then? Has this been fixed too?
 
No, though that's expected. If you're doing matches or replacements you need to use the version that will be used in the URL, which is URL encoded. Anything outside of "basic" characters will be URL encoded automatically as they're not valid in URLs otherwise.
 
However, for 2.1, I'm experimenting with a change such that if both the from and to fields have a trailing slash, it will optionally match it. I believe this should generally be safe, but I would like it go through a bit more "normal" testing via the beta process as there could be some gotchas (particularly on certain routes which have slightly different behaviors).
I am not entirely sure if that change is the cause, but I've experienced a problem with route filters on 2.1 that did not exist on 2.0:
If the index route is set to forums/ and there is a route filter forums/ -> f/, the index page is not accessiable (Code: no_controller, controller: -, action: -)
 
Back
Top Bottom