Opened 19 years ago

Closed 17 years ago

#2086 closed defect (fixed)

Hack in admin's base.css generates 404 to non existing 'null' file.

Reported by: rudolphfroger [-at-] gmail [-dot-] com Owned by: nobody
Component: contrib.admin Version:
Severity: minor Keywords:
Cc: sam@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

I can see lot's off 404 errors in my apache logs because django/contrib/admin/media/css/base.css has this:

@import "null?\"\{";

The error in the log is like this:

[Mon Jun 05 00:15:28 2006] [error] [client 192.168.1.1] File does not exist: /home/someuser/django/trunk/django/contrib/admin/media/css/null, referer: http://media.example.com/admin/css/base.css

I know an more official way to give IE5 a special treatment in HTML, example:

  <!--[if lte IE 5.0000]>
        <link rel="stylesheet" type="text/css" href="http://media.example.com/admin/css/ie5.css" />
    <![endif]-->

But I don't know if something like this is usable in this case. Anyway IMHO it's just a minor bug so only solve it when all major bugs for a release are fixed.

Change History (11)

comment:1 by Adrian Holovaty, 19 years ago

Severity: normalminor

comment:2 by Adrian Holovaty, 19 years ago

Owner: changed from Adrian Holovaty to Wilson Miner

comment:3 by Wilson Miner, 19 years ago

As a rule, I'd prefer to handle all the CSS hacks/import filters in the CSS files and leave only one stylesheet link per page in the HTML. So far, this is the only way I know of to hide all the imported CSS from IE5 (which is what this rule does). Seeing that it creates unnecessary 404s, I'll see if I can find another method of hiding CSS from IE5. Suggestions welcome!

comment:4 by Chris Beaven, 18 years ago

Triage Stage: UnreviewedAccepted

comment:5 by anonymous, 18 years ago

Cc: sam@… added

comment:6 by robbie <robbie@…>, 18 years ago

Wouldn't the simplest solution be just to include a empty file called "null" in the admin's css directory? From my understanding of the hack, it won't cause any change in function, and will stop the webserver generating misleading 404 errors.

comment:7 by Chris H. <chris@…>, 18 years ago

I'd be +1 on adding the null file...

comment:8 by donsun60@…, 17 years ago

I wanna know how to hack.. I want someone to give me admin login. i mean username and password for admin. i know .. 'or='

comment:9 by Wilson Miner, 17 years ago

Resolution: fixed
Status: newclosed

(In [6197]) Fixes #2086: Added null.css file to avoid spurious 404s due to the "high pass filter" which hides admin CSS from IE5/Win.

comment:10 by labs@…, 17 years ago

Patch needs improvement: set
Resolution: fixed
Status: closedreopened

The same error message
File does not exist: /home/someuser/example/www/media/css/null, referer: http://www.example.com/admin/
still appears in the logs.
Probably because base.css tries to import 'null', not 'null.css'.

comment:11 by Gary Wilson, 17 years ago

Resolution: fixed
Status: reopenedclosed

(In [6716]) Fixed #2086 -- Changed base.css to import null.css (added in [6197]) instead of null.

Note: See TracTickets for help on using tickets.
Back to Top