suntrop Posted April 7, 2021 Share Posted April 7, 2021 I am using images tags as links and some tags contain special characters (like schwarzweiß). Links are pointing to a URL segment. Problem is, URL with special chars are not working. I added $config->pageNameCharset = 'UTF8'; in my config file but still I see a 404 on URL with special chars. Any idea? Link to comment Share on other sites More sharing options...
wbmnfktr Posted April 7, 2021 Share Posted April 7, 2021 In order to have UTF8 support in URLs you have to define a whitelist as well. See here: https://processwire.com/blog/posts/page-name-charset-utf8/ With "social chars" you mean Umlaute? I guess... so you can have those either with the UTF8 page name support or you transform the classics like ä,ö,ü, and ß to ae, oe, ue, ans ss within the page name settings. You will find it here: domain.tld/processwire/module/edit?name=InputfieldPageName Link to comment Share on other sites More sharing options...
suntrop Posted April 7, 2021 Author Share Posted April 7, 2021 Yes, I am speaking of Umlauts like äöü and ß. I did enable UTF8 page names and the whitelist contains all chars I need. However, it still shows a 404 for pages containing special chars. Link to comment Share on other sites More sharing options...
wbmnfktr Posted April 7, 2021 Share Posted April 7, 2021 Just played around with UTF8 page names here in a local setup and it throws 404s here as well. Can't really say why as I rarely use that feature. I might have to dig a little deeper into this. Link to comment Share on other sites More sharing options...
suntrop Posted April 7, 2021 Author Share Posted April 7, 2021 I can't remember I have used this before. Especially for URL segments. But the website uses a lot of image tags. Unfortunately tags are saved as simple strings not with slugs alongside. Link to comment Share on other sites More sharing options...
BitPoet Posted April 7, 2021 Share Posted April 7, 2021 Have you switched section 16A for 16B in .htaccess? Link to comment Share on other sites More sharing options...
suntrop Posted April 8, 2021 Author Share Posted April 8, 2021 16 hours ago, BitPoet said: Have you switched section 16A for 16B in .htaccess? Yes, but nothing changed. Once there is any non ascii character I get a 404. Link to comment Share on other sites More sharing options...
suntrop Posted April 8, 2021 Author Share Posted April 8, 2021 BTW: it doesn't work with page URL either. I can create/save a page with name like teßtpage but get a 404 here as well. So it doesn't seem to be URL segments problem only I am using pW 3.0.165 Link to comment Share on other sites More sharing options...
Jan Romero Posted April 8, 2021 Share Posted April 8, 2021 Mh, following the 4 steps from the blog works fine for me on 3.0.172 (in fact, i believe step 2 hasn’t been necessary for a while). Can you confirm that the config takes by putting var_dump($config->pageNameCharset, $config->pageNameWhitelist); into a template somewhere? Btw, just uncommenting 16B in .htaccess won’t do. You must also disable 16A. Link to comment Share on other sites More sharing options...
suntrop Posted April 8, 2021 Author Share Posted April 8, 2021 2 hours ago, Jan Romero said: Can you confirm that the config takes Yes, can confirm and I had disabled 16A Just upgraded to current dev version. It got kind of worse. When I save a page with the pagename "teßtpage" the field is empty after admin page reloads. DB has a wrong punycode of "xn-stseite". However, saving "testsäite" will save but still results in a 404. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now