Page MenuHomePhabricator

combobox pulldown lists options for last pulldown for every instance
Closed, ResolvedPublic


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.)

Version: master
Severity: major



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:32 AM
bzimport set Reference to bz45506.

Where are you seeing this exactly? Is this happening for all courses? And is it still happening?

Created attachment 11871
example of the problem

It's still happening, on all the en.wikipedia courses. Here's a screenshot I just took.


Screenshot_from_2013-03-01_11:32:57.png (1×1 px, 152 KB)

Bizarre... I changed the term value from "testing" to "testing!" on

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...

Hmm... I just successfully changed the term back to Testing on that course. But I cannot change the term on this page:

(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.

wtf... That is so really odd!

You cannot change it to "2013 Q1", though other things appear to work. Currently at "2013-Q1"...

I suspect something is wrong with the db state... Guess having a script to rebuild all denormalized storage would be useful

Adding Ori: any ideas about this bug?

Change 76729 had a related patch set uploaded by Ragesoss:
Change variable name to fix pulldown prepopulation: bug 45506

Change 76729 abandoned by Ragesoss:
Change variable name to fix pulldown prepopulation: bug 45506

This doesn't fix the problem.

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>

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.

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. wrote:

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.

Change 89881 had a related patch set uploaded by AndyRussG:
Fix combobox options bug wrote:

I haven't tested this patch outside the Vagrant environment. All it does is revert a small mistake inserted here:

Change 89881 merged by jenkins-bot:
Fix combobox options bug wrote:

Dump of EP extension-related DB table replicas for English Wikipedia