WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
392 stars 630 forks source link

Provide a useful error message when course home wiki is changed to an invalid wiki #1760

Closed ragesoss closed 1 year ago

ragesoss commented 6 years ago

Currently, the message is just 'Internal Server Error'. It should be something more useful.

You can replicate this issue as follows:

  1. create a new program
  2. click edit details, and change the language and wiki; you have to change it to one that doesn't exist. for example, pick language egl and project wikinews

The option to change Home Wiki Language and Home Wiki Project in the Edit Details view will only show up if your dev environment is configured in the non-Wiki Education setting, which means that you must edit application.yml and change the dashboard_url value (to anything but dashboard.wikiedu.org).

What happens on the server is that, if a Wiki record doesn't already exist, it tries to create one. But first, it pings the server of that wiki to confirm that it exists. There is no egl.wikinews.org (but it's a valid language, probably for wikipedia) so throwing the error is correct and should be shown to the user. but the message should be understandable, informing the user that the requested wiki doesn't exist.

wiki error

Note: When this gets fixed, we need to close this one as well: https://phabricator.wikimedia.org/T258320

mtrivera commented 6 years ago

I'm interested in working on this, do you have any resources for Rails? I have done some basic Ruby before.

psinghal20 commented 6 years ago

Hi @mtrivera , in my opinion the rails documentation is one of the best resource. If you have a basic understanding of the MVC architecture, it will be much easier for you to work with rails.

mtrivera commented 6 years ago

@psinghal20 Thanks, I will look into it.

mtrivera commented 6 years ago

Having issues with my dev environment setup. If someone else wants to work on this, go ahead.

RyanHiller commented 5 years ago

Hey @ragesoss a group of students and myself were hoping to tackle this issue as a starting point for contributing to the repo. Is this issue still open? I got my dev environment set up however I am not seeing a language field in order to recreate the error. Not sure if this is due to changes in the project or if I am not recreating the program correctly. Any help would be appreciated.

Screenshot_2019-10-22 Test2 — Programs and Events Dashboard

ragesoss commented 5 years ago

The interface changed so that now the language is selected as part of the home_wiki or tracked_wikis field.

The basic way to recreate the error still holds, though: try setting egl.wikinews.org as the home wiki and it should throw an error.

GrantSchumacher commented 5 years ago

The interface changed so that now the language is selected as part of the home_wiki or tracked_wikis field.

The basic way to recreate the error still holds, though: try setting egl.wikinews.org as the home wiki and it should throw an error.

Was able to recreate error. Student team is currently working on providing a more useful message on branch "wikieddev"

aparicio-ronald commented 4 years ago

student team working on this issue in wikieddev branch was not able to finish this issue. we found the language array in wiki.rb we tried to create another array called NOTAVAILABLE where we added the egl language and tried to create a validation. also made a json message file for notavailable and render this file in errors_controller.rb. Since our semester period is almost over we have realized that we won't be able to continue with this issue. advise where to look into can be in categories_controller.rb file where @wiki is defined with the language parameter.

ragesoss commented 4 years ago

Thanks for the update.

ragesoss commented 4 years ago

@AmitJoki this would make a great GCI issue.

AmitJoki commented 4 years ago

@ragesoss sure, on it.

Iphytech commented 2 years ago

Hello @ragesoss I'm interested in this issue, can I work on it? Thanks

ragesoss commented 2 years ago

@Iphytech yes, go for it.

Iphytech commented 2 years ago

Thanks