MARC batch edit iframe can fail to load

Bug #1822376 reported by Galen Charlton
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
New
Medium
Galen Charlton

Bug Description

The MARC Batch Edit Dojo UI can fail to load when embedded in the AngularJS staff client if the hostname of the Evergreen server starts with "eg".

Evergreen 3.1+ (most likely)

Revision history for this message
Galen Charlton (gmc) wrote :

Specifically, the following line in Open-ILS/web/js/ui/default/staff/cat/catalog/app.js is at fault:

  $scope.batchedit_url = $location.absUrl().replace(/\/eg.*/, '/opac/extras/merge_template');

A URL like https://eg.example.org/eg/staff/... will match that regex starting with the hostname.

Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
importance: Undecided → Medium
description: updated
tags: added: cataloging webstaffclient
Revision history for this message
Meg Stroup (mstroup) wrote :

Side note (for this bug and others): an AngularJS tag would be helpful.

tags: added: marc
Revision history for this message
Martha Driscoll (mjdriscoll) wrote :

We ran into this on our training system which we call "egtraining". My fix to the regex is to make sure "eg" is followed by a slash. I'm not sure if this will break under other circumstances:

$scope.batchedit_url = $location.absUrl().replace(/\/eg\/.*/, '/opac/extras/merge_template');

app.js has a few more places where absUrl() may match a hostname if it has "staff" in it:

var url = $location.absUrl().replace(/\/staff.*/, '/opac/advanced');
$scope.verifyurls_url = $location.absUrl().replace(/\/staff.*/, '/url_verify/sessions');
$scope.manageauthorities_url = $location.absUrl().replace(/\/staff.*/, '/cat/authority/list');

tags: removed: webstaffclient
Elaine Hardy (ehardy)
tags: added: cat-batchedit
removed: cataloging marc
Revision history for this message
Jason Boyer (jboyer) wrote :

Marking a duplicate of generic "We're regex-ing wrong" bug 1862834

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.