-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edits should never create an empty page #2412
Comments
@ragesoss hi Sage, Oureachy applicant here, can I work on this? Thanks and have wonderful weekend. |
@mcastorena0316 go for it! |
Hi @ragesoss I am writing cause I have a few questions and I want to understand more about this bug you are having. I already clone and run in my local environment the application and do a little tryouts by myself. When I create a program, a page link appears so everyone can enroll in it. If I tried to delete it directly from the program's page, it appears that I need to erase the campaign first, but when I enter directly to the campaign, I am able to remove it. I realize that when I remove it, I still am able to enter the course's link, even though it's already deleted. It this the bug you want me to work on? If not, can you please give me a little more info about it? I'm adding some pictures of it. Thanks! |
Hi @mcastorena0316 ! This bug is referring to the edits to Wikipedia that the Dashboard makes. In particular, If a student adds an assignment, and then later removes it, the Dashboard will first make an edit adding a template to the talk page, and then later will make an edit removing that template. These edits are done through background jobs via Sidekiq. The bug in this case is when a student adds an assignment, but then immediately removes it again, and the article they assigned doesn't even have a talk page yet (so adding the assignment should have started that talk page via the |
Hey @ragesoss , Is this bug is still open and if yes should I try to fix this ? |
@Gaurav453 go for it. It's still open. |
@ragesoss, seems like to reproduce this bug, I will have to first find an article which doesn't have a talk page. How can I find such an article? |
I don't think it's necessary to have a live page without a talk page on Wikipedia production in order to fix this bug. While you won't be able to reproduce it in terms of configuring your dev environment to make live edits on Wikipedia — which you probably should not do anyway — you can still write a test for it by mocking the Wikipedia response for a non-existent page. |
I think |
WikiEduDashboard/lib/wiki_assignment_output.rb Lines 30 to 38 in c722b4c
@ragesoss, is this existing part of code related to this issue in some way? I mean, from the comment it seems that this piece of code handles the same case as mentioned in the issue. |
Yes, this is closely related. There are a number of other situations where we already return |
I'm working on this! |
@ragesoss I opened a PR for this issue but have some concerns as I'm not entirely sure the PR addresses all the necessary changes. Appreciate your feedback whenever you have the time. |
In some cases, such as an assignment being added and then removed again before the edit job is run, the dashboard may create a page that doesn't exist already, but make it empty. Ideally, this should not happen; in such cases, it should just leave the page as a redlink.
The text was updated successfully, but these errors were encountered: