oppia / foundation-website

Repository for developing the new Oppia Foundation website.
Apache License 2.0
6 stars 32 forks source link

Page should redirect for URLs ending with a trailing slash. #124

Closed seanlip closed 3 years ago

seanlip commented 4 years ago

To reproduce:

  1. Go to https://www.oppiafoundation.org/blah/

Expected behaviour: There is a redirect to the home page.

Observed behaviour: A blank page with some odd artifacts shows up. No redirect happens.

seanlip commented 4 years ago

/cc @hoangviet1993 -- would you be able to look into this, please? It looks quite odd.

Thanks!

hoangviet1993 commented 4 years ago

I think this is a trailing slash issue? If you take a valid url like oppiafoundation.org/about and append a trailing slash to it, you would reproduce the bug. One interesting note is that you have to append the slash directly yourself, linking the page would not replicate the bug.

Try clicking it here: https://oppiafoundation.org/about/

I have been looking up potential solutions and so far, no quick hacks unfortunately.

I have seen a few SO popping up about ui-router's strictMode would get rid of trailing slashes in URL. However, that means I would have to bring in ui-router in place of the AngularJS's routeProvider that we are currently using.

How should we handle this bug? More investigation?

seanlip commented 4 years ago

Yes, I think it is a trailing slash issue, and that it needs more investigation. Some thoughts:

What do you think?

rajk1121 commented 4 years ago

Hi, I am a beginner in open source contribution. Is this issue still open? I would like to contribute if possible.

seanlip commented 4 years ago

Hi @rajk1121 -- you're welcome to help! Please follow the instructions at https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#setting-things-up to get started.

rajk1121 commented 4 years ago

Thanks. I will get back to you as soon as I set up the project locally on my PC.

rajk1121 commented 4 years ago

I am having this error.Please help os

rajk1121 commented 4 years ago

Any help will be appreciated.

seanlip commented 4 years ago

I have never seen this error before, sorry. But one thought might be that google_appengine didn't download properly. Do you have a wrapper_util.py in the top level of the google_appengine/ folder (alongside dev_appserver.py and run_tests.py)? If not, then that might signal an incomplete download. If so, I'm not sure what's going on -- you might need to look at how Python handles imports in general, maybe something else on your sys.path is interfering with trying to figure out where to import the library from.

Yashs911 commented 3 years ago

Hi, @seanlip I would like to work on this issue. Can you please guide me on what all changes do I need to make? After some surfing, I found that we need to write a rule in htaccess code to redirect them.

seanlip commented 3 years ago

Sorry, I don't know what changes need to be made here -- that's part of what whoever takes up the issue would need to figure out. It requires some investigation. I don't think it is related to htaccess, though, because this site does not run on an Apache Web Server.

Ayushsunny commented 3 years ago

I wanna work on this issue

seanlip commented 3 years ago

Thanks for your interest, @Ayushsunny. We are planning to combine the pages here with that of the main site, so it is probably not worthwhile to work on this issue. I'm going to close it.