Undefined variable: cacheDir, cachePath, keyString

Author Message

Carl Heaton

Thursday 10 March 2005 12:52:06 am

I get the following error on every first page load after clearing *all* caches. I checked the relevant ini's as described within http://ez.no/community/forum/setup_design/something_terribly_wrong_with_ez_cache

Undefined variable:  cacheDir in /home/www/dev/var/plain/cache/template/compiled/pagelayout-4f0eb7d9e6988bca5c6db687d142a069.php on line 289
Undefined variable:  cachePath in /home/www/dev/var/plain/cache/template/compiled/pagelayout-4f0eb7d9e6988bca5c6db687d142a069.php on line 289
Undefined variable:  keyString in /home/www/dev/var/plain/cache/template/compiled/pagelayout-4f0eb7d9e6988bca5c6db687d142a069.php on line 289
-bash-3.00$ pwd
/home/www/dev/settings
-bash-3.00$ grep -Ri cacheDir *
site.ini:CacheDir=cache
site.ini:CacheDir=content
texttoimage.ini:CacheDir=var/cache/texttoimage
-bash-3.00$ grep -Ri cachePath *
nothing
-bash-3.00$ grep -Ri keyString *
nothing
---
-bash-3.00$ pwd
/home/www/dev/settings/siteaccess/plain_user
-bash-3.00$ grep -Ri cacheDir *
-bash-3.00$ grep -Ri cachePath *
-bash-3.00$ grep -Ri keyString *

Should I be specifying these vars somewhere?

---
Carl
{'EZP 3.5, Apache 2, FC2, PHP 4.3.4 (cgi), MySQL 4.1.9'}

Frederik Holljen

Friday 11 March 2005 12:12:11 am

The settings you are looking for should be set in site.ini. Check the following:
- are the settings actually defined in the correct sections of the configuration file.
- check if caches are actually created where you expect them to be (sounds like it since it only complains the first time)

Frey Staso

Friday 11 March 2005 4:33:11 pm

I JUST had this problem myself, it was driving me and the sys admin crazy, we tried refreshing everything, changing the file, and then eventually deleting the file.

What was happening was no matter what I did, it still gave the error. Eventually I backed up that specific file and deleted it on the server, but it still had it cached somehow.

To solve the problem, we backstepped and deleted everything (all folders and files) under home/www/dev/var/plain/cache/ and on a next refresh, ezpublish was fine. MAKE SURE YOU BACK THOSE FILES UP FIRST!!!!

Ɓukasz Serwatka

Saturday 12 March 2005 5:41:04 am

Hi Carl,

Try to add keys string in {cache-block}

{cache-block expiry=300 keys=$node.node_id}

and clear the cache.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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 18 2025 22:10:03
Script start
Timing: Jan 18 2025 22:10:03
Module start 'layout'
Timing: Jan 18 2025 22:10:03
Module start 'content'
Timing: Jan 18 2025 22:10:05
Module end 'content'
Timing: Jan 18 2025 22:10:05
Script end

Main resources:

Total runtime1.1245 sec
Peak memory usage4,096.0000 KB
Database Queries64

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 588.0469152.6406
Module start 'layout' 0.00750.0037 740.687539.4922
Module start 'content' 0.01121.1117 780.1797640.1016
Module end 'content' 1.12290.0016 1,420.281312.1250
Script end 1.1245  1,432.4063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2921160.0002
Check MTime0.00140.1212160.0001
Mysql Total
Database connection0.00160.142510.0016
Mysqli_queries1.060294.2753640.0166
Looping result0.00080.0682620.0000
Template Total1.087496.720.5437
Template load0.00200.179920.0010
Template processing1.085496.517720.5427
Template load and register function0.00020.016210.0002
states
state_id_array0.00090.076410.0009
state_identifier_array0.00070.062920.0004
Override
Cache load0.00170.1511240.0001
Sytem overhead
Fetch class attribute can translate value0.00070.058940.0002
Fetch class attribute name0.00190.164980.0002
XML
Image XML parsing0.00510.456040.0013
class_abstraction
Instantiating content class attribute0.00000.001480.0000
General
dbfile0.00410.3637330.0001
String conversion0.00000.000940.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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs