eZ Publish 4.2: Cached CSS Files not readable by the Browser

Author Message

Axel Wehner

Thursday 01 October 2009 8:02:27 pm

Hello,

i've just installed the new eZ Publish 4.2 with the eZ Website Interface in an VirtualHost on Apache 2.2.11 with PHP 5.2.6. The installation worked very well. No Problems.

After the installation i accessed the new site and saw that the site looks very strange:
http://ecantus.de/misc/ezprob1.png (Frontpage Screenshot)

After i took a look in the sourcecode, i saw that a cached stylesheet is not readable by the Browser and see the Error Page (kernel (20)) which tell me there is a Missing Module (var) if i try to open it directly. I suppose that's the Problem.

<link rel="stylesheet" type="text/css" href="/var/ezwebin_site/cache/public/stylesheets/0e7b335dc5cb41df886bb97f1f059387_all.css" media="all" charset="utf-8" />

The stylesheet is available in the filesystem and should be readable:

root@srv1:/var/www/mysite.de/var/ezwebin_site/cache/public/stylesheets# ls -la
insgesamt 188
drwxrwxrwx 2 www-data www-data  4096 2009-10-02 04:32 .
drwxrwxrwx 4 www-data www-data  4096 2009-09-30 17:38 ..
-rw-r--r-- 1 www-data www-data 36541 2009-09-30 17:43 0e7b335dc5cb41df886bb97f1f059387_all.css

I tried to clear the cache and refreshed the page, but it didn't helped. Could it be an Apache Rewrite Issue? I'll post as a precaution my VirtualHost Setup here:

<VirtualHost mysite.de>

    DocumentRoot /var/www/mysite.de
    ServerName mysite.de
    ServerAlias admin.mysite.de
    ServerAlias www.mysite.de
    ErrorLog /var/www/mysite.de/logs/error.log
    CustomLog /var/www/mysite.de/logs/access.log common
    DirectoryIndex index.php
    AcceptPathInfo On

    <Directory /var/www/mysite.de>
        Options FollowSymLinks
        AllowOverride None
    </Directory>

    <IfModule mod_php5.c>
        php_admin_flag safe_mode Off
        php_admin_value register_globals    0
        php_value magic_quotes_gpc  0
        php_value magic_quotes_runtime  0
        php_value allow_call_time_pass_reference 0
    </IfModule>

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule content/treemenu/? /index_treemenu.php [L]
        Rewriterule ^/var/storage/.* - [L]
        Rewriterule ^/var/[^/]+/storage/.* - [L]
        RewriteRule ^/var/cache/texttoimage/.* - [L]
        RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
        Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
        Rewriterule ^/share/icons/.* - [L]
        Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
        Rewriterule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
        RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
        RewriteRule ^/favicon\.ico - [L]
        RewriteRule ^/robots\.txt - [L]
        # Uncomment the following lines when using popup style debug.
        # RewriteRule ^/var/cache/debug\.html.* - [L]
        # RewriteRule ^/var/[^/]+/cache/debug\.html.* - [L]
        RewriteRule .* /index.php
    </IfModule>

</VirtualHost>

I've the same problem in the Administration Interface. I hope someone can help me with this problem. If you need more information, just tell me what.
Thank you!

Best regards,
Axel

Sébastien Antoniotti

Thursday 01 October 2009 11:04:48 pm

Hi Axel,

I think you just need to replace this apache rewrite rule :

RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]

by

RewriteRule ^/var/[^/]+/cache/(texttoimage|public)/.* - [L]

Regards,
Seb

eZ Publish Freelance
web : http://www.webaxis.fr

Axel Wehner

Friday 02 October 2009 5:01:50 am

Hi Seb,

great! It works now. Thank you very much for your help.
I've to learn more about mod_rewrite. :)

Best regards,
Axel

Patrick Allaert

Tuesday 20 October 2009 5:58:08 am

Thanks Axel and Sébastien to catch this issue.

This has been fixed in the doc: http://ez.no/doc/ez_publish/technical_manual/4_x/installation/virtual_host_setup

Regards,
Patrick

Patrick ALLAERT
http://patrickallaert.blogspot.com/

Sébastien Antoniotti

Tuesday 20 October 2009 6:42:25 am

It was with pleasure,

Best regards,
Seb

eZ Publish Freelance
web : http://www.webaxis.fr

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 21:34:02
Script start
Timing: Jan 30 2025 21:34:02
Module start 'layout'
Timing: Jan 30 2025 21:34:02
Module start 'content'
Timing: Jan 30 2025 21:34:03
Module end 'content'
Timing: Jan 30 2025 21:34:03
Script end

Main resources:

Total runtime1.1201 sec
Peak memory usage8,192.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.6172151.2734
Module start 'layout' 0.00480.0033 739.8906220.7656
Module start 'content' 0.00821.1111 960.65634,537.3828
Module end 'content' 1.11920.0008 5,498.039115.7656
Script end 1.1200  5,513.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2873160.0002
Check MTime0.00120.1079160.0001
Mysql Total
Database connection0.00070.060510.0007
Mysqli_queries1.021791.2122650.0157
Looping result0.00070.0629630.0000
Template Total1.072295.720.5361
Template load0.00200.177020.0010
Template processing1.070295.542520.5351
Template load and register function0.00140.121110.0014
states
state_id_array0.00130.111910.0013
state_identifier_array0.00070.062020.0003
Override
Cache load0.00170.1488450.0000
Sytem overhead
Fetch class attribute can translate value0.00190.166230.0006
Fetch class attribute name0.00220.193780.0003
XML
Image XML parsing0.00510.451230.0017
class_abstraction
Instantiating content class attribute0.00000.0041100.0000
General
dbfile0.00610.5404280.0002
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 41
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs