chrispanag
(Christos Panagiotakopoulos)
October 13, 2019, 10:55am
1
Hello all,
after we upgraded our forum to 2.4.0beta6, we noticed that various categories lead to a 404 error page.
And after you reach this 404 error page, when you hit the forum logo (to go the home page) it just stays in the 404 page. So, we suspect the front-end reaches a “bad” state.
This call returns a 404:
https://rembetiko.gr/c/%CE%B8%CE%AD%CF%83%CE%B5%CE%B9%CF%82-%CE%B1%CE%BD%CF%84%CE%B9%CE%B8%CE%AD%CF%83%CE%B5%CE%B9%CF%82/find_by_slug.json
If it helps, sometime in the past, we changed our slugs from Encoded back to ASCII . But as it seems, the categories slug never changed. We tried changing the slugs from ASCII to Encoded, but nothing changed. (deleted cache etc.)
You can see the problem on our discourse instance: https://rembetiko.gr
Any suggestions? We suspect some kind of bug here…
5 Likes
Interesting, any ideas @falco ?
3 Likes
Falco
(Falco)
October 13, 2019, 5:58pm
3
Oh I may have forgotten about category slugs in my latest patch, where I fixed only the topics slugs.
Will take a look on Monday.
6 Likes
azawawi
(Ahmad M. Zawawi)
October 15, 2019, 8:15am
5
Falco:
in my latest patch
Is this the commit you are referring to?
committed 03:38PM - 11 Oct 19 UTC
When an admin changes the site setting slug_generation_method to
encoded, we we… ren't really encoding the slug, but just allowing non-ascii
characters in the slug (unicode).
That brings problems when a user posts a link to topic without the slug, as
our topic controller tries to redirect the user to the correct URL that contains
the slug with unicode characters. Having unicode in the Location header in a
response is a RFC violation and some browsers end up in a redirection loop.
Bug report: https://meta.discourse.org/t/-/125371?u=falco
This commit also checks if a site uses encoded slugs and clear all saved slugs
in the db so they can be regenerated using an onceoff job.
2 Likes
Falco
(Falco)
October 15, 2019, 6:51pm
6
Yes that one.
I’m fixing what is broken on categories on this PR:
master ← more-encoded-slug-fixes
merged 08:08PM - 16 Oct 19 UTC
A bunch of extra places to consider when dealing with encoded slugs.
To be honest, I kinda regret the initial fix as it is touching too much of the code to handle encoded URLs.
4 Likes
So is this fully fixed now or still WIP?
2 Likes
I have exactly the same problem in my forum , after updating a few minutes ago to: 2.4.0.beta6 [a37dafdd4d]
Error 404 seems to appear only in the categories that have “accent” in their text.
I hope you can release the patch and update soon as it breaks the proper functioning of the forum.
Thanks!
1 Like
Falco
(Falco)
October 16, 2019, 8:55pm
9
4 Likes