XF 2.2 Route format - parameterbag entry is null for non English characters

Scandal

Well-known member
I try to create a new route for my addon.
Let's say that Route prefix is mypage
... and the Route format is
Code:
:int<data_id,title>/:str<letter>/:page

If I visit /mypage/lalala.5/A
I can get the "Α" via $params->letter.

But if I try to visit a page with non English character or a symbols as letter:
If I visit /mypage/lalala.5/Γ

$params->letter is NULL.

Ι tried also :any<letter> but it returns also other parts from the url.

Any idea? :)
 
Strictly speaking, if you want to include a non-Latin character like that, it would need to come through URL encoded. However, our string params aren't really designed for entirely arbitrary values -- we only accept alphanumeric, underscore and dashes in them.

This might need to be something you pass via a query string parameter.
 
Yes you're right. I think more about it and decided to use a filter parameter instead.
This is because xF2 has the function to romanize characters on the URL, so if someone has enabled it, it will break the whole variable in case it is not english. :)
 
Back
Top Bottom