Opened 14 years ago

Closed 13 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


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] File does not exist: /home/someuser/django/trunk/django/contrib/admin/media/css/null, referer:

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="" />

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 Changed 14 years ago by Adrian Holovaty

Severity: normalminor

comment:2 Changed 14 years ago by Adrian Holovaty

Owner: changed from Adrian Holovaty to Wilson Miner

comment:3 Changed 14 years ago by Wilson Miner

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 Changed 13 years ago by Chris Beaven

Triage Stage: UnreviewedAccepted

comment:5 Changed 13 years ago by anonymous

Cc: sam@… added

comment:6 Changed 13 years ago by robbie <robbie@…>

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 Changed 13 years ago by Chris H. <chris@…>

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

comment:8 Changed 13 years ago by donsun60@…

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 Changed 13 years ago by Wilson Miner

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 Changed 13 years ago by labs@…

Patch needs improvement: set
Resolution: fixed
Status: closedreopened

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

comment:11 Changed 13 years ago by Gary Wilson

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