Django

Code

Ticket #2086 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

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

Reported by: rudolphfroger [-at-] gmail [-dot-] com Assigned to: nobody
Milestone: Component: django.contrib.admin
Version: Keywords:
Cc: sam@robots.org.uk Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 1

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.

Attachments

Change History

06/04/06 19:25:45 changed by adrian

  • severity changed from normal to minor.

06/04/06 19:40:22 changed by adrian

  • owner changed from adrian to wilson.

06/04/06 23:15:52 changed by wilson

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!

01/21/07 22:33:23 changed by SmileyChris

  • stage changed from Unreviewed to Accepted.

03/21/07 07:55:47 changed by anonymous

  • cc set to sam@robots.org.uk.

05/02/07 09:03:12 changed by robbie <robbie@prelab.net>

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.

06/19/07 10:36:08 changed by Chris H. <chris@heisel.org>

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

07/25/07 07:18:33 changed by donsun60@gmail.com

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

09/14/07 13:26:06 changed by wilson

  • status changed from new to closed.
  • resolution set to fixed.

(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.

09/21/07 11:52:38 changed by labs@ixopusada.com

  • status changed from closed to reopened.
  • needs_better_patch set to 1.
  • resolution deleted.

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'.

11/25/07 14:29:27 changed by gwilson

  • status changed from reopened to closed.
  • resolution set to fixed.

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


Add/Change #2086 (Hack in admin's base.css generates 404 to non existing 'null' file.)




Change Properties
Action