Web staff 404 errors in paths to files

Bug #1709239 reported by Linda Jansova
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

We are using 2.12.4. The web staff client – when switched to Czech – does not seem to successfully find a number of – mostly javascript – files due to incorrect paths.

When symlinks are used to correct the wrong paths and file names, the browser can load the web pages without these errors. As a result, more translated strings appear.

Here comes a list of links with wrong NLS path that we have discovered so far and temporarily (in our installation) corrected through symlinks:

lrwxrwxrwx 1 opensrf opensrf 5 srp 7 22:22 /openils/var/web/js/dojo/openils/acq/nls/cs -> cs-cz
lrwxrwxrwx 1 opensrf opensrf 5 srp 7 23:06 /openils/var/web/js/dojo/openils/booking/nls/cs -> cs-cz
lrwxrwxrwx 1 opensrf opensrf 5 srp 7 23:18 /openils/var/web/js/dojo/openils/authority/nls/cs -> cs-cz
lrwxrwxrwx 1 opensrf opensrf 5 srp 7 21:44 /openils/var/web/js/dojo/openils/User/nls/cs -> cs-cz
lrwxrwxrwx 1 opensrf opensrf 5 srp 7 23:10 /openils/var/web/js/dojo/openils/reports/nls/cs -> cs-cz
lrwxrwxrwx 1 opensrf opensrf 5 srp 7 22:52 /openils/var/web/js/dojo/openils/URLVerify/nls/cs -> cs-cz
lrwxrwxrwx 1 opensrf opensrf 5 srp 7 22:22 /openils/var/web/js/dojo/openils/widget/nls/cs -> cs-cz

We have also tried to map the following missing files (js and map file) to similar existing files (add a fake link to another js or css file):

lrwxrwxrwx 1 opensrf opensrf 22 srp 7 22:07 /openils/var/web/js/ui/default/staff/build/js/angular-animate.js -> angular-animate.min.js
lrwxrwxrwx 1 opensrf opensrf 17 srp 7 21:47 /openils/var/web/js/ui/default/staff/build/css/bootstrap.min.css.map -> bootstrap.min.css

Also, there seems to be a typo in font file name (file extension):
lrwxrwxrwx 1 opensrf opensrf 33 srp 7 21:46 /openils/var/web/js/ui/default/staff/build/fonts/glyphicons-halflings-regular.woff2 -> glyphicons-halflings-regular.woff

One javascript file seems to be missing:
/js/dojo/fieldmapper/OrgLasso.js

A better solution than to use symlinks would of course be to correct the paths in the appropriate places in Evergreen if these can be identified.

This bug is related to https://bugs.launchpad.net/evergreen/+bug/1629078.

Tags: i18n filepaths
Revision history for this message
Ben Shum (bshum) wrote :

Have to test this behavior. According to miker in IRC, this is "normal" cause the page will try to find the specific cs-cz and not finding that, drop down to cs and find that.

But should test to see if adding the links assists with the page render as indicated here.

tags: added: i18n
Revision history for this message
Mike Rylander (mrylander) wrote :

Well, specifically, the nls files are showing the normal Dojo behavior. Dojo will look for cs-cz, and if it gets a 404, it will look for just cs. It causes log noise, but it's working as designed (for better or worse).

The angular-animate.js error looks like an outright bug, though, and we should really only be asking to load the .min.js version. That may be a typo/thinko, or a holdover from debugging.

The bootstrap.min.css.map error should only show up in the dev tools, and only when one attempts to view the css in the Sources section (IIRC). To fix that, we should just copy over the .map file (and, probably, all the other .map files for css and js, to aid debugging). They should not be retrieved in normal operation.

Revision history for this message
Linda Jansova (skolkova-s) wrote :

Thank you, Ben and Mike, for taking a look at this!

Do I understand it correctly that even if Dojo finds the appropriate file using the cs-cz path, the log in the web browser debugger mode will still show (unsuccessful) looking for cs path?

tags: removed: webstaffclient
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.