Apache Log error - missing CSS files

Bug #791225 reported by George Duimovich
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Low
Unassigned

Bug Description

EG 2.0.6

Example 1:

  [error] File does not exist: /openils/var/web/css/skin/default/register_custom.css, referer: http://catalogue.nrcan.gc.ca/css/skin/default/register.css

register.css has:
@import url("register_custom.css");

Looks like it could be intended for our local customizations (so I'm just commenting it out), but not clear to me if this file should be there and needed for other purposes.

Example 2:

    [error] File does not exist: /openils/var/web/css/opac_marc.css, referer: http://catalogue.nrcan.gc.ca/opac/en-US/skin/default/xml/rdetail.xml?r=8224133

opac_marc.css does not exist..

At least one reference is coming from: oilsMARC21slim2HTML.xsl

<link href='/css/opac_marc.css' rel='stylesheet' type='text/css'></link>

Tags: cleanup
Revision history for this message
George Duimovich (george-duimovich) wrote :

Additional "missing file" -- "custom.js" (or the link to this file needs to be commented out)

In /server/OpenILS/util_overlay.xul
<script type="text/javascript" src="/xul/rel_2_0_6/server/skin/custom.js" />

Reference note in:
/server/main/constants.js
/* to override these locally (with remote xul), create a server/skin/custom.js file ....

To avoid others having to track these down, I suggest we ship the script link to custom.js commented out (since it's not included) or include an empty "custom.js" with comment like /* include your custom lines here */

Revision history for this message
Dan Scott (denials) wrote :

The purpose of the *_custom.* files, as I understand it, is to prevent sites from modifying the shipped files (because if they modify the shipped files for 2.0.6, those modifications will get blown away when you upgrade to 2.0.7).

I agree in principle that reducing noise in the log files so that sites can focus on log entries of actual value. In theory it should be possible to make the Makefile install target touch *_custom.* if the target file does not exist at install time. We need a complete list of those files, of course.

Marking as "bitesize".

tags: added: bitesize
Changed in evergreen:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Dan Scott (denials) wrote :

Oh, and this concept (if not the complete list of files that can be customized) would make for a good subsection of "Customizing your Evergreen 2.0 install"... adding a tag for DIG, too.

tags: added: documentation
Revision history for this message
Michael Peters (mrpeters) wrote :

As far as I can tell, these are the potential "*_custom.css" files that should be touched, if not already existent.

Open-ILS/web/css/skin/default/register_custom.css
Open-ILS/xul/staff_client/build/server/skin/global_custom.css
Open-ILS/xul/staff_client/build/server/skin/simple_auth_custom.css
Open-ILS/xul/staff_client/build/server/skin/cat_custom.css
Open-ILS/xul/staff_client/build/server/skin/patron_display_custom.css
Open-ILS/xul/staff_client/build/server/skin/patron_summary_custom.css
Open-ILS/xul/staff_client/build/server/skin/circ_custom.css

Maybe a little bash script that runs after installation and symlinking the current build to "server" this would suffice?

#!/bin/bash

customfiles=(
           /openils/var/web/css/skin/default/register_custom.css
           /openils/var/web/xul/server/skin/global_custom.css
           /openils/var/web/xul/server/skin/simple_auth_custom.css
           /openils/var/web/xul/server/skin/cat_custom.css
           /openils/var/web/xul/server/skin/patron_display_custom.css
           /openils/var/web/xul/server/skin/patron_summary_custom.css
           /openils/var/web/xul/server/skin/circ_custom.css
           )

for file in "${customfiles[@]}" ; do

if [[ -e $customfiles ]]
    then /bin/echo "$customfiles already exists, will not make any changes"
    else /usr/bin/touch $customfiles
fi
done
exit 0

Revision history for this message
Michael Peters (mrpeters) wrote :

Ooops...a little bug in my script. My apologies.

This is corrected.

#!/bin/bash

customfiles=(
           /openils/var/web/css/skin/default/register_custom.css
           /openils/var/web/xul/server/skin/global_custom.css
           /openils/var/web/xul/server/skin/simple_auth_custom.css
           /openils/var/web/xul/server/skin/cat_custom.css
           /openils/var/web/xul/server/skin/patron_display_custom.css
           /openils/var/web/xul/server/skin/patron_summary_custom.css
           /openils/var/web/xul/server/skin/circ_custom.css
           )

for file in "${customfiles[@]}" ; do

if [[ -e $file ]]
    then /bin/echo "$file already exists, will not make any changes"
    else /usr/bin/touch $file
fi
done
exit 0

Revision history for this message
Steven Chan (schan2) wrote :

There are also two other CSS files that are absent and constantly generating 404 errors in our apache error log (about 120 occurrences for our June 3rd log file):

File does not exist: /srv/openils/var/web/css/opac_marc.css
File does not exist: /srv/openils/var/web/css/theme/default/vandelay.css

They are being referenced in the source code:

$ pwd
/Software/Evergreen-ILS-2.0.6
$ find . -exec egrep -Hi 'opac_marc\.css' {} \;
./Open-ILS/src/extras/marc2html: <link href='/css/opac_marc.css' rel='stylesheet' type='text/css'></link>
./Open-ILS/xsl/oilsMARC21slim2HTML.xsl: <link href='/css/opac_marc.css' rel='stylesheet' type='text/css'></link>
$ find . -exec egrep -Hi 'vandelay\.css' {} \;
./Open-ILS/web/templates/default/vandelay/vandelay.tt2:<link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/vandelay.css'/>
./Open-ILS/web/templates/default/vandelay/vandelay.tt2:<link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/theme/[% ctx.skin %]/vandelay.css'/>

Presumably, the CSS files are for customization. I would suggest that empty files, or better, some default files be included in the distribution.

Revision history for this message
Michael Peters (mrpeters) wrote :

Pushed a branch (user/mrpeters-isl/create_custom_css) with a proposal to address this.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=commitdiff;h=20f96e5c6fdf42583d0a8d6511939e01a201e0b7

tags: added: pullrequest
Revision history for this message
Jason Etheridge (phasefx) wrote :

Michael, I think we should stick with the Makefile/touch notion rather than actually have the files already exist, lest they accidentally trample actual customizations (I don't know if that would ever happen in practice, but I could see it happening).

Revision history for this message
Thomas Berezansky (tsbere) wrote :

For the record, I maintain a custom css file or two in git, and have at least one installed by hand. Creating the css files in the repos would thus conflict with my existing git-tracked ones, but also would overwrite my non-git-tracked file.

Revision history for this message
Dan Scott (denials) wrote :

Adding an install_data_hook target to the automake file(s) that runs the prefix / DESTDIR-aware equivalent of the touch script that Michael put together, above, would be the best way to handle this in our current infrastructure, methinks.

tags: removed: pullrequest
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Jason,

What's up with this bug? You removed the pullrequest tag. Do you recall why?

Thanks,
Jason

Revision history for this message
Jason Etheridge (phasefx) wrote :

I didn't like the actual solution in the branch offered. These files should either be supplied by the system admin or touch-created during build time, but they shouldn't exist as actual files in the repository that can trample over some site's customizations.

However, there are multiple solutions listed in this the ticket. I don't have any beef with the customcsscheck.sh script (just the create_custom_css branch), though it should probably be re-purposed as Dan suggested.

Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Here's a branch to have the custom CSS files named touched at build time.

Some of them already get made if you build a staff client along with your install (see commit fd742045), but some don't, and touching the files twice within the same installation process hurts nothing.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/senator/touch-custom-files

This would probably backport through rel_2_2 just fine.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.4.0-alpha
Revision history for this message
Ben Shum (bshum) wrote :

I tested senator's branch and found that I got errors for touching *_custom.css in xul/server locations. I guess the problem is that the location is not defined with the stamp ID (like xul/stamp/server/...) used during installation and also that the xul files are not copied until slightly later in the process.

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

Removing pullrequest till further work is done.

tags: removed: pullrequest
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-alpha1 → 2.4.0-beta
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-beta → 2.4.0-rc
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-rc → none
Ben Shum (bshum)
no longer affects: evergreen/2.2
Kathy Lussier (klussier)
tags: added: bitesize-doc
removed: bitesize
Kathy Lussier (klussier)
tags: removed: bitesize-doc
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

It looks to me like part of this ticket was taken care of in 2008, (using github because of the blame feature)
https://github.com/evergreen-library-system/Evergreen/commit/fd742045d1b7af72cd9b29ccdbcd156cf3f4d44d

When I look at my 2.7.1 system I see the following in
pensrf@virt-evergreen2:/openils/var/web/xul/server/skin$ ls -l *custom.css
-rw-r--r-- 1 opensrf opensrf 0 Nov 10 10:17 bucketz39_custom.css
-rw-r--r-- 1 opensrf opensrf 0 Nov 10 10:17 cat_custom.css
-rw-r--r-- 1 opensrf opensrf 0 Nov 10 10:17 circ_custom.css
-rw-r--r-- 1 opensrf opensrf 0 Nov 10 10:17 global_custom.css
-rw-r--r-- 1 opensrf opensrf 0 Nov 10 10:17 patron_display_custom.css
-rw-r--r-- 1 opensrf opensrf 0 Nov 10 10:17 patron_summary_custom.css
-rw-r--r-- 1 opensrf opensrf 0 Nov 10 10:17 print_custom.css
-rw-r--r-- 1 opensrf opensrf 0 Nov 10 10:17 serial_custom.css
-rw-r--r-- 1 opensrf opensrf 0 Nov 10 10:17 simple_auth_custom.css

So those are already being touched by the staff client build.

Maybe senators branch would be fine if it only tried to touch the two non xul files?

no longer affects: evergreen/2.4
no longer affects: evergreen/2.3
Revision history for this message
Terran McCanna (tmccanna) wrote :

Can anyone verify if this is still an issue or if it has been resolved over the years?

tags: added: cleanup
Revision history for this message
Deborah Luchenbill (deborah) wrote :

I wanted to bump this ticket again.

Looks, I think, like the documentation mentioned in #3 is already in the docs (https://docs.evergreen-ils.org/eg/docs/latest/admin_initial_setup/designing_your_catalog.html#_how_to_override_template_files) so I'm going to remove the documentation tag.

Is the rest of it still something that needs to be addressed?

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