Please excuse my bad English, I had it translated by google.
I use css injector. Works well so far.
However, there is a message in the log (page not found) Posted: public:/css_injector/css_injector_1.css
As the site is specified: www.meine_domain.de/public://css_injector/css_injector_1.css m0x55m?

How can this script be modified?

Thank you for the help,

Deutsch Original:

bitte entschuldige mein schlechtes Englisch, ich musste es von google übersetzen lassen.
Ich nutze css injektor. Funktioniert soweit gut. Jedoch gibt es in den Protokollnachrichten einen (page not found) Eintrag: public:/css_injector/css_injector_1.css
Als Ort wird angegeben: www.meine_domain.de/public://css_injector/css_injector_1.css?m0x55m

Wie kann das script geändert werden?

Vielen Dank für die Hilfe,


rfay’s picture

Category: bug » support

The last time this happened it was on Windows, and somehow somebody had actually gotten a file created in the root directory of the drupal distribution called public://. That will blow everything up. Please see if you've got that, and delete it if you do.

joeyda3rd’s picture

I'm getting this same problem. Causing 404 errors on every page load for every rule set. I don't see a directory called "public://"

Podengo’s picture

I noticed this bug as well. I found a workaround that works OK for my needs so far.

When I need to use the URL elsewhere in Drupal (7 at least), I need to substitute "sites/default/files/" for the "public://" part.

rfay’s picture

@Podengo, that would definitely *not* be recommended. You too should look for the public: directory in your root. Is this on Windows?

torbasow’s picture

I have this issue in the WYSIWIG module. Method wysiwyg_get_css in sites/all/modules/wysiwyg/wysiwyg.module does not support CSS URLs with public: protocol. It would be cured by adding line

if(file_uri_scheme($filepath)==='public') $files[]=file_create_url($filepath); else


$files[] = base_path() . $filepath;
mototribe’s picture

awesome, had the exact same problem and #5 fixed it. Thank you!!!

rfay’s picture

So this sounds like a bug in wysiwyg. Has it been filed?

twuli’s picture

For me the same result. Note no longer appears in the log.

Can anyone of you give a hint at http://drupal.org/project/wysiwyg?

Thank you

steve.m’s picture

I just had this happen as well, and it seems unrelated to wysiwyg (it happens when displaying pages, not editing them).

My short-term fix has been to turn off core's "Aggregate and compress CSS files" performance option for the moment. As soon as I do this, the css injector files show up as expected.

ultimike’s picture

I can confirm this issue as well when CSS Injector is used on pages with a WYSIWYG text area.

I've created a patch based on torbasow's code (comment 5 above) over in the WYSIWYSG issue queue: http://drupal.org/node/1793704#comment-6516150


kitling55’s picture

I have the latest version of wysiwyg but the problem described in #2 is still happening... I don't have a public:// folder anywhere in my site. It seems that the site eventually find the correct location of the css file after reporting a 404, very strange.

relaxpor’s picture

#5 work Thank you.

rfay’s picture

Status: Active » Closed (duplicate)

I think you'll find the correct answer in the Wysiwyg queue: #1793704: Fully process local CSS file paths. Marking this as a duplicate.