• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Not a bug XenForo_Router::resolveActionWithStringParam removes slashes from route path...

Mr. Goodie2Shoes

Well-known member
#1
This isn't a bug or anything, and may work without any issue but this messes up one of my add-on's routing. I think it wont hurt to add '/' during imploding the components together. :)
 
Last edited:

Mr. Goodie2Shoes

Well-known member
#3
I created a system that allows adding multiple data inside a route path.

For example: "admin.php?add-ons/{$addon_id}/versions/{$version_id}/edit"

So when the reouter fetches the addon_id from the path the action that is returned is "versions{$version_id}edit" and the next routing phase fails. But adding '/' in the implode function fixes the issue.

I do know this is how it was designed. :)
 

Mike

XenForo developer
Staff member
#4
As you've noted a couple times, this is as designed. The return value is an action so it can be any value that could be manipulated to be an action (which comes down to A-Z 0-9 _ mostly). Anything outside that range shouldn't be relied upon.