Panels uses ctools_css_add_css() to add CSS for any file that's within the Drupal directory. It's only necessary to use this when the file is in the files directory.

Due to the current check, I was seeing 404s from CSS declarations like this when using private files.

<link type="text/css" rel="stylesheet" media="all" href="http://example.com/system/files/sites/all/modules/contrib/panels/plugins/layouts/onecol/onecol.css" /> 

This check could possibly be centralized in ctools_css_add_css(), however wondered why the check was being done outside the function in the first place, so starting here.

Comments

lazly’s picture

Status: Needs review » Needs work

I confirming it, the patch is correct but dont fix the problem for me. I have error 403 if i wanna open the generated css file directly with private filesystem. Have you got any other idea?

Letharion’s picture

Assigned: Unassigned » merlinofchaos
Status: Needs work » Needs review
nasi’s picture

Just to confirm, I have come across this problem as well, trying to use private files and the bricks_2col layout - the twocol_bricks.css file fails to load.

Letharion’s picture

Just noting that I assigned this to merlin since he should probably take a look at the logic, there could very well be a good reason for the current logic.

dstol’s picture

Assigned: merlinofchaos » Unassigned
damienmckenna’s picture

vijaycs85’s picture

StatusFileSize
new948 bytes
new647 bytes
+++ b/plugins/display_renderers/panels_renderer_standard.class.php
@@ -419,12 +419,12 @@ class panels_renderer_standard {
-    $path = file_create_path($filename);

We can't remove $path as it is used in other case.

japerry’s picture

Status: Needs review » Fixed

Appears to work well. Fixed.

  • japerry committed 075d4b5 on 6.x-3.x authored by vijaycs85
    Issue #1247244 by vijaycs85, catch: Check for CSS location produces 404s...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.