Last modified: 2013-10-25 13:30:54 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 T47506, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45506 - combobox pulldown lists options for last pulldown for every instance
combobox pulldown lists options for last pulldown for every instance
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
EducationProgram (Other open bugs)
master
All All
: High major (vote)
: ---
Assigned To: Andrew Green
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-27 18:34 UTC by Sage Ross
Modified: 2013-10-25 13:30 UTC (History)
5 users (show)

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


Attachments
example of the problem (152.04 KB, image/png)
2013-03-01 16:36 UTC, Sage Ross
Details
Dump of EP extension-related DB table replicas for English Wikipedia (6.63 MB, application/x-gzip)
2013-10-17 18:01 UTC, Andrew Green
Details

Description Sage Ross 2013-02-27 18:34:33 UTC
As of today, I cannot change the term of a course. I can enter a new value, but it does not get saved upon Submit.

Also, the pulldown that should list term values in use by other courses instead lists the values for "Course level". The "Field of study" pulldown lists the course level values too. (As does the "Course level" pulldown, as expected.)
Comment 1 Jeroen De Dauw 2013-03-01 16:28:55 UTC
Will look into this now
Comment 2 Jeroen De Dauw 2013-03-01 16:31:27 UTC
I cannot reproduce this issue on master (8aaf1c500f6de2da50f025e5aac0de121cfa0762).
Comment 3 Jeroen De Dauw 2013-03-01 16:32:33 UTC
Where are you seeing this exactly? Is this happening for all courses? And is it still happening?
Comment 4 Sage Ross 2013-03-01 16:36:06 UTC
Created attachment 11871 [details]
example of the problem

It's still happening, on all the en.wikipedia courses. Here's a screenshot I just took.
Comment 5 Jeroen De Dauw 2013-03-01 20:16:38 UTC
Bizarre... I changed the term value from "testing" to "testing!" on https://en.wikipedia.org/wiki/Education_Program:Example_University/Example_Course_%282013_Q1%29

Saved it correctly, as it is showing up when viewing the course page itself.

Code on master for the edit page also looks correct, and is behaving correctly for me.

No clue what's going on...
Comment 6 Sage Ross 2013-03-01 20:51:13 UTC
Hmm... I just successfully changed the term back to Testing on that course. But I cannot change the term on this page: http://en.wikipedia.org/wiki/Education_Program:University_of_San_Francisco/Environmental_Law_(Spring_2013)

(It should be changed to "2013 Q1", along with the rest of the "Spring 2013" courses."

And the pulldowns were still wrong for example course, as well.
Comment 7 Jeroen De Dauw 2013-03-01 22:55:46 UTC
wtf... That is so really odd!

You cannot change it to "2013 Q1", though other things appear to work. Currently at "2013-Q1"...
Comment 8 Jeroen De Dauw 2013-03-01 22:59:58 UTC
I suspect something is wrong with the db state... Guess having a script to rebuild all denormalized storage would be useful
Comment 9 Sage Ross 2013-05-09 16:27:08 UTC
Adding Ori: any ideas about this bug?
Comment 10 Gerrit Notification Bot 2013-07-30 15:23:35 UTC
Change 76729 had a related patch set uploaded by Ragesoss:
Change variable name to fix pulldown prepopulation: bug 45506

https://gerrit.wikimedia.org/r/76729
Comment 11 Gerrit Notification Bot 2013-07-30 17:19:23 UTC
Change 76729 abandoned by Ragesoss:
Change variable name to fix pulldown prepopulation: bug 45506

Reason:
This doesn't fix the problem.

https://gerrit.wikimedia.org/r/76729
Comment 12 Sage Ross 2013-07-30 18:57:17 UTC
In investigating the pulldown forms, I found that it always populates options for the three "combobox" pulldown forms with the correct options for the last one on the page.

I also note that the inline HTML for these pulldowns seems to correct (that is, the options for the last entry don't get repeated for the others), so I guess it's a CSS-related problem  with the last one overwriting the others?

Here's what the HTML looks like (with both showing the second set of options when rendered on-wiki):

</td></tr><tr class="mw-htmlform-field-EducationProgram\HTMLCombobox ep-combobox-tr"><td class="mw-label"><label for="mw-input-wpitem-field">Field of study</label></td><td class="mw-input"><select name="wpitem-field" id="mw-input-wpitem-field" class="ep-combobox-tr"><option value=""></option>
<option value="literature" selected="">literature</option>
<option value="math">math</option>
<option value="science">science</option></select>

</td></tr><tr class="mw-htmlform-field-EducationProgram\HTMLCombobox ep-combobox-tr"><td class="mw-label"><label for="mw-input-wpitem-level">Course level</label></td><td class="mw-input"><select name="wpitem-level" id="mw-input-wpitem-level" class="ep-combobox-tr"><option value=""></option>
<option value="advanced" selected="">advanced</option>
<option value="intermediate">intermediate</option>
Comment 13 Sage Ross 2013-09-01 18:46:16 UTC
The problem seems to be with the ep.combobox.js, but I don't understand it well enough to figure out where it goes wrong.

https://github.com/wikimedia/mediawiki-extensions-EducationProgram/blob/master/resources/ep.combobox.js
Comment 14 Sage Ross 2013-10-10 16:43:15 UTC
I've filed a separate bug for the "term cannot be changed" part of this bug: bug 55568.

This bug is now for just the combobox pulldown issue.
Comment 15 Andrew Green 2013-10-15 02:53:51 UTC
This bug does show up in a fresh MediaWiki-Vagrant install with the education role enabled.

To reproduce:
- Add an institution.
- Add a course.
- Edit the course you added.
- On the edit page, open a pulldown list for Course Name, Academic Term or Field of Study.
Comment 16 Gerrit Notification Bot 2013-10-15 19:21:25 UTC
Change 89881 had a related patch set uploaded by AndyRussG:
Fix combobox options bug

https://gerrit.wikimedia.org/r/89881
Comment 17 Andrew Green 2013-10-15 19:41:01 UTC
I haven't tested this patch outside the Vagrant environment. All it does is revert a small mistake inserted here:

http://git.wikimedia.org/blobdiff/mediawiki%2Fextensions%2FEducationProgram/05679c1cf13bf19b66e4bf9a39192ea68d258873/resources%2Fep.combobox.js
Comment 18 Jeroen De Dauw 2013-10-15 19:47:08 UTC
Hehe. It's not my fault \o/
Comment 19 Gerrit Notification Bot 2013-10-15 19:50:29 UTC
Change 89881 merged by jenkins-bot:
Fix combobox options bug

https://gerrit.wikimedia.org/r/89881
Comment 20 Andrew Green 2013-10-17 18:01:41 UTC
Created attachment 13519 [details]
Dump of EP extension-related DB table replicas for English Wikipedia

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


Navigation
Links