Last modified: 2013-10-21 15:51:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57568, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55568 - term cannot be changed for courses, in some cases
term cannot be changed for courses, in some cases
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
EducationProgram (Other open bugs)
master
All All
: Normal normal (vote)
: ---
Assigned To: Andrew Green
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-10 16:41 UTC by Sage Ross
Modified: 2013-10-21 15:51 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sage Ross 2013-10-10 16:41:10 UTC
Branching this off from bug 45506.

Some values are not saved for the "Term" field when a course is edited and saved. For example, in the en.wiki example course, trying to change the term to "Fall 2013" will result in a new history entry, but the new term value will not be saved. Some values save normally, however.

https://en.wikipedia.org/wiki/Education_Program:Example_University/Example_Course_%282013_Q1%29
Comment 1 Andrew Green 2013-10-16 18:13:20 UTC
This bug does *not* show up, or at least not right away, in a fresh MediaWiki-Vagrant install with the education role enabled.

This is what I did to try to reproduce it:
- Add an institution.
- Add a course.
- Edit the course.
- Change the term.
- Save the changes.

My guess is that somewhere there is a bug (or there are bugs) that make the database inconsistent in some way. The bug(s) may or may not be in the code for modifying terms, may even occur only in rare situations, and have given us inconsistent data on the live site. This inconsistency could be what causes the specific issue documented here, and maybe other problems, too (like this one: https://bugzilla.wikimedia.org/show_bug.cgi?id=43782).

If this is what's happening, then maybe the best approach would be to first check for inconsistencies in the tables used by this extension on the live site(s), fix them (manually or semi-automatically), and try to figure out what caused them in the first place.

Any comments or suggestions on how to proceed would be greatly appreciated!!!
Comment 2 Andrew Green 2013-10-17 18:07:05 UTC
Here's a dump of the recent DB tables related to this extension for English Wikipedia.

https://bugzilla.wikimedia.org/attachment.cgi?id=13519
Comment 3 Andrew Green 2013-10-17 23:37:12 UTC
Strangely, all of a sudden I am able to change the term of the example course:

https://en.wikipedia.org/wiki/Education_Program:Example_University/Example_Course_%282013_Q1%29

That didn't work a few days ago.

I was also able to add a new course and change the term:

https://en.wikipedia.org/wiki/Education_Program:University_of_Wikipedia/Another_Test_Course
Comment 4 Andrew Green 2013-10-17 23:52:40 UTC
Correction: term can't be changed to a term that is already used with another course. For example, I can't change the Example Course's term to Fall 2013.
Comment 5 Andrew Green 2013-10-18 05:07:35 UTC
Reproduced successfully, in a fresh MediaWiki-Vagrant install with the education role enabled, like so:

- Add an institution.
- Create a course for that institution.
- Go back to the page of the institution.
- Create a second course with a different term.
- Once the second course has been created, click on the edit tab.
- Try to change the term to the same value as the term for the first course.

And... voilà! Your term does not change correctly!

Conclusions so far:
- This is not a DB bug, but a JS bug: when it occurs, the term value is incorrect in the HTTP post sent to the server.
- It manifests itself when the new value for the term *is* among the values mentioned by the <option> children of the <select> element for setting the term. (Thanks, Sage, for the tip leading to this.)
Comment 6 Andrew Green 2013-10-18 13:17:50 UTC
This JS patch 

https://gerrit.wikimedia.org/r/89881

submitted for

https://bugzilla.wikimedia.org/show_bug.cgi?id=45506

appears to fix this bug, too, at least following the procedure for reproducing it described above!

So it looks like they were a single bug after all!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links