Forums / Install & configuration / eZ Publish 4.2: Cached CSS Files not readable by the Browser

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

eZ debug

Timing: Jan 18 2025 04:19:11
Script start
Timing: Jan 18 2025 04:19:11
Module start 'content'
Timing: Jan 18 2025 04:19:13
Module end 'content'
Timing: Jan 18 2025 04:19:13
Script end

Main resources:

Total runtime1.8756 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0163 588.0859180.7891
Module start 'content' 0.01631.7208 768.8750635.0469
Module end 'content' 1.73710.1383 1,403.9219341.3438
Script end 1.8755  1,745.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.2237210.0002
Check MTime0.00160.0855210.0001
Mysql Total
Database connection0.00140.076710.0014
Mysqli_queries1.782495.03362020.0088
Looping result0.00200.10912000.0000
Template Total1.827897.520.9139
Template load0.00270.144520.0014
Template processing1.825197.310620.9126
Template load and register function0.00020.010210.0002
states
state_id_array0.00190.101610.0019
state_identifier_array0.00310.164920.0015
Override
Cache load0.00230.1240450.0001
Sytem overhead
Fetch class attribute can translate value0.00160.083640.0004
Fetch class attribute name0.00140.076180.0002
XML
Image XML parsing0.00250.130840.0006
class_abstraction
Instantiating content class attribute0.00010.0048100.0000
General
dbfile0.00390.2063390.0001
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 41
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs