Error unchecking Exclude Electronic Resources when locale picker is enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
3.3 |
Won't Fix
|
Undecided
|
Unassigned | ||
3.4 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
EG 3.3.4, other versions likely affected
When the locale picker is enabled, the OPAC's "Exclude Electronic Resources" checkbox works as expected if you check it to exclude the resources. However, if you uncheck it while on the search results page, the box disappears and the page doesn't refresh to show you your results including electronic resources.
When you exclude electronic resources from a search, the results page includes a hidden input field:
<input type="hidden" name="fi:
When there is no locale picker, the only form on the results page is the search form, and the hidden input gets added to it. But if the locale picker is enabled, your results page has *two* forms, and the hidden input gets added to the first one, i.e. the locale picker form instead of the search form. Then, when you uncheck the Exclude Electronic Resources checkbox, a Javascript function tries to remove the hidden input, but it can't find it (because it's in the wrong form); it removes the checkbox instead, and you get an error on checkbox.
Changed in evergreen: | |
milestone: | 3.4.1 → 3.4.2 |
Changed in evergreen: | |
milestone: | 3.4.2 → 3.4.3 |
Changed in evergreen: | |
milestone: | 3.4.3 → 3.5.0 |
Changed in evergreen: | |
milestone: | 3.5.0 → 3.5.1 |
Changed in evergreen: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
tags: | added: i18n opac signedoff |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Steps to reproduce:
[1] In eg_vhost.conf, under <Location /eg>, uncomment OILSWebLocale entries to enable multiple locales and display the locale picker.
[2] Restart Apache.
[3] Do a search.
[4] On the results page, check the "Exclude Electronic Resources" box. The page will refresh as your search is resubmitted with e-resources excluded.
[5] On the new results page, uncheck the "Exclude Electronic Resources" box. The checkbox disappears, the page is not refreshed, and the JS console shows a "TypeError: checkbox.form is null" error on exclude_onchange().