Re: [squid-users] adding an error-based class/id to the body of error pages

From: E.S. Rosenberg <esr+squid_at_g.jct.ac.il>
Date: Thu, 26 May 2011 12:14:18 +0300

2011/5/26 Amos Jeffries <squid3_at_treenet.co.nz>:
> On Thu, 26 May 2011 00:27:16 +0300, E.S. Rosenberg wrote:
>>
>> Hi all,
>> I was wondering if in the the official version of squid 3.1 it would
>> be possible to change <body> to <body id="%c"> in the errorpages.
>>
>> Of course on a technical level it is possible and I have already
>> implemented this locally by us, so what is my reasoning?
>>
>> Very simple, in our organization we would love to use the new
>> auto-negotiating multi-lingual error-pages however this brings one
>> problem we have users from all over the world and we can't guarantee
>> that the user will translate the error message correctly when he/she
>> calls the helpdesk, of course the actual error code is hidden in the
>> code but to ask the user to view source is also going a bit far.
>
> I had to assume during the design that it would work to get the user to name
> the error statement (ie "Invalid request") in a mutual language between them
> and the helpdesk. Note that the page code ERR_INVALID_REQ and the bold error
> name "Invalid Request" are fixed pairs. If you find a translation where the
> bold text is mismatching we would like to know and fix that.
What I mean is that the helpdesk and the user don't necessarily speak
the same language so when the user has to render the error message
that he got in his/her native language to the common language they may
translate it wrong because they don't understand the actual meaning of
the message.

>
> I'm a bit doubtful that colour coding will work. There being more error
> pages than available distinct colours. I'm interested in how you get along
> with this.
We will probably only tag the most important/common pages, but you can
also use color combinations (header color 1 footer color 2).
>
> Any ideas about how to securely tag the page in a visible way that does not
> annoy the users. I'm all ears.
>
>>
>> So as a solution we want to use colored backgrounds based on the
>> error message.
>> Obviously using sed or a similar tool I could add the css into the
>> various ERR_* files to be different for each file but I think the
>> nicest solution is that in the errorpages.css file I can just write
>> #SQUID_ERR_CODE {/*css goes here*/}, or #SQUID_ERR_CODE div {}, etc.
>>
>> Using sed in our installed base I replaced all <body> tags with <body
>> id="%c"> but I would love to see this change upstream because now I
>> have to remember that when the squid package gets updated I have to
>> again replace the body-tags in all the error messages.
>>
>> Let me know what you think and thank you very much,
>> Eli Rosenberg
>
> Sure. Added. It will be in the daily langpack from tomorrow and in upcoming
> releases.
>
> Amos
>
Thank you very much and best regards,
Eliyahu - אליהו
Received on Thu May 26 2011 - 09:14:29 MDT

This archive was generated by hypermail 2.2.0 : Thu May 26 2011 - 12:00:03 MDT