Main Koha release repository
https://koha-community.org
43f9758c3d
When JavaScript make copy of DOM set for MARC tag, it tries to reassign label elements to another id, the problem is there is no check for existence of that label element, so in case when option "advancedMARCeditor" is set to "Don't display", labels were absent which caused JavaScript to crush in the middle of process with uncaught exception. This patch wraps this label assignment in try/catch hook like it's done in the code around for other elements, to allow the script to proceed when description labels are not present. To test: 1) Check in the system preferences interface subsection that "advancedMARCeditor" is set to "Display". 2) Go to the "Add MARC record" cataloguing section and press "Repeat this tag" button near the MARC tag record to ensure that it makes duplicate in the interface as expected. 3) Then again in the system preferences interface subsection change "advancedMARCeditor" to "Don't display". 4) Return back to the "Add MARC record" interface, refresh the page to have no MARC field labels displayed, and try duplicating the tag again. 5) Ensure that it doesn't work, also you can notice a JavaScript error "Cannot read property "setAttribute" of undefined..." in the JavaScript console of your browser. 6) Apply the patch. 7) Repeat the test sequence (changes will be in the step 5), ensure that the tag gets duplicated even when description labels are not present. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
||
---|---|---|
acqui | ||
admin | ||
api | ||
authorities | ||
basket | ||
bin | ||
C4 | ||
catalogue | ||
cataloguing | ||
circ | ||
clubs | ||
course_reserves | ||
debian | ||
docs | ||
errors | ||
etc | ||
ill | ||
installer | ||
Koha | ||
koha-tmpl | ||
labels | ||
members | ||
misc | ||
offline_circ | ||
opac | ||
patron_lists | ||
patroncards | ||
plugins | ||
pos | ||
reports | ||
reserve | ||
reviews | ||
rotating_collections | ||
serials | ||
services | ||
skel | ||
suggestion | ||
svc | ||
t | ||
tags | ||
tmp/modified_authorities | ||
tools | ||
virtualshelves | ||
xt | ||
.editorconfig | ||
.eslintrc.json | ||
.gitignore | ||
.htaccess | ||
.mailmap | ||
.perlcriticrc | ||
.scss-lint.yml | ||
about.pl | ||
app.psgi | ||
changelanguage.pl | ||
cpanfile | ||
fix-perl-path.PL | ||
gulpfile.js | ||
help.pl | ||
INSTALL | ||
Koha.pm | ||
koha_perl_deps.pl | ||
kohaversion.pl | ||
LICENSE | ||
mainpage.pl | ||
Makefile.PL | ||
MANIFEST.SKIP | ||
package.json | ||
README | ||
README.md | ||
README.robots | ||
rewrite-config.PL | ||
yarn.lock |
Koha is a free software integrated library system (ILS).
Koha is distributed under the GNU GPL version 3 or later.
Note: Koha does not accept pull requests from git hosting sites.
Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.
For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch
The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook