HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

"404 file not found" error is shown if post title has non-Latin characters on my localhost

edited July 2017 in Feedback

I created a new post in Urdu language in Vanilla 2.3.1. It is being correctly displayed which you can see in attached screenshot.

But when I click on title, 404 file not found error is shown.

How to fix this issue?

Comments

  • R_JR_J Admin

    The url above reads "localhost/vanilla/discussion/4/someEscapedCharacters"
    Could you try if one of those links are working:
    "localhost/vanilla/discussion/4/test"
    "localhost/vanilla/index.php?p=discussion/4/test"
    "localhost/vanilla/index.php?p=/discussion/4/test"

    Since your forum root is "vanilla" you should open the file .htaccess and change
    # RewriteBase / to
    RewriteBase /vanilla

  • All 3 URLs you have posted above worked. But modifying .htaccess file didn't fix the problem.

    I have created a new post here with same title in Urdu and here it works.

    https://open.vanillaforums.com/discussion/33779/یہ-ٹاپک-اردو-میں-ہے#latest

  • R_JR_J Admin

    Please paste your url here (the localhost/vanilla/discussion/4/%... url)

  • LincLinc Admin

    It looks like your install is converting discussion titles using htmlentities() when generating discussions' URLs. I wonder if you have an addon installed that is modifying discussionUrl(). Try disabling all your addons and testing again.

    I have a localhost install of 2.3.1 and am not running into this issue, so I have to assume it's either a rogue addon or something wrong with your local server setup where it's not supporting UTF-8 URLs.

  • edited July 2017

    I have disabled all add ons but the problem persists. URL is:

    http://localhost/vanilla/discussion/4/%FB%9C%FB%81-%F9%B9%F8%A7%F9%BE%FA%A9-%F8%A7%F8%B1%F8%AF%F9%88-%F9%85%FB%9C%FA%BA-%FB%81%FB%92#latest

  • My setup is

    Windows 10
    XAMPP
    PHP 5.6.31

  • rbrahmsonrbrahmson ✭✭✭

    Does the following link work (Basically reiterating @R_J's question)?

    http://localhost/vanilla/discussion/4

  • @rbrahmson said:
    Does the following link work (Basically reiterating @R_J's question)?

    http://localhost/vanilla/discussion/4

    Yes it works.

  • rbrahmsonrbrahmson ✭✭✭
    edited July 2017

    OK, let's try one more thing. Can you get on your browser to a non-vanilla HTML file whose name contains the very same Arabic characters (on your local Apache server). You will have to create such a file manually.

    If that fails the problem obviously is unrelated to Vanilla...

  • I created a new HTML file and named it یہ ٹاپک اردو میں ہے and I was able to open it in browser. Screenshots given below.

  • rbrahmsonrbrahmson ✭✭✭

    I'm unfamiliar the arabic alphabet but i see a difference in between the words.

    یہ-ٹاپک-اردو-میں-ہے - from vanilla
    یہ ٹاپک اردو میں ہے from your html

    So can you create a new discussion with a title on a single Urdu word (to ensure that there are no special characters inadvertently embedded in the url)? Let me know how it works out.

  • I created one word title and it worked fine.
    I created two words title and it worked fine.
    I created three words title and it worked fine.
    I created four words title and it showed error. So looks like problem happens when you go beyond three words.

  • R_JR_J Admin

    I bet it is a problem of your local server. There seems to be no problem here, in my test installation there is no problem and Linc also reported no error from his installation.

    The url that you have pasted doesn't translate to any problematic characters and your server setup works correct for non-urdu discussions.

    You could check your server log file to see which file the server tried to access. There might be problems with the Rewrite Rules.

  • Yeah I've got the same problem after a my first installation of this forum, it's Chinese language and the same issue was found, exactly the same as described, I'm going to look further, luck to me!

  • LincLinc Admin

    @zhuzhaodan said:
    Yeah I've got the same problem after a my first installation of this forum, it's Chinese language and the same issue was found, exactly the same as described, I'm going to look further, luck to me!

    Thanks for corroborating. Looking forward to knowing more about this. I'm out of ideas and it's very difficult to investigate a thing you can't reproduce yourself.

Sign In or Register to comment.