On Nov 7, 3:08 am, bwilt <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I was just trying to investigate my trouble with caching outlined in
> this thread :-
>
> http://groups.google.com/group/cake-php/browse_thread/thread/3ad96f46...
>
> This is my first try with the test suite so forgive me if I'm doing
> things wrong, I haven't started writing a test yet but struck failed
> error for the test mentioned in the subject line .....is this
> correct ? All other tests I have run seem to work, the failed errors
> are as follows :-
>
> * Failed
> Pattern [/cake:nocache/] detected at character [1661] in
> [String: <!--cachetime:1226044587--><?php App::import('Controller',
> 'CacheTest'); $controller =& new CacheTestController(); $controller->plugin =
> $this->plugin = ''; $controller->helpers = $t...] as
>
> [cake:nocache] in region [...php $x = 1; ?> <?php $x++; ?> View
> Content <cake:nocache></cake:nocache> <cake:nocache>cache...] at [/var/
> www/dev/src-devlin/web/wiltonsoftware/cake/tests/cases/libs/view/
> helpers/cache.test.php line 224]
> /var/www/dev/src-devlin/web/wiltonsoftware/cake/tests/cases/libs/
> view/helpers/cache.test.php -> CacheHelperTest ->
> testCacheEmptySections
> * Failed
> Pattern [@<head>\s*<title>Posts</title>\s*<\?php $x = 1; \?>\s*</
> head>\s*<body>\s*<\?php $x\+\+; \?>\s*<\?php $x\+\+; \?>\s*View Content
> \s*<\?php $y = 1; \?>\s*<\?php echo 'cached count is:' . $x; \?>[EMAIL
> PROTECTED]
> not detected in [String: <!--cachetime:1226044587--><?php
> App::import('Controller', 'CacheTest'); $controller =& new
> CacheTestController(); $controller->plugin = $this->plugin = '';
> $controller->helpers = $t...] at [/var/www/dev/src-devlin/web/
> wiltonsoftware/cake/tests/cases/libs/view/helpers/cache.test.php line
> 235]
> /var/www/dev/src-devlin/web/wiltonsoftware/cake/tests/cases/libs/
> view/helpers/cache.test.php -> CacheHelperTest ->
> testCacheEmptySections
>
> I'm running RC3 latest 7835...
>
> Thanks for any help,
> Brett
You mentioned a class in the subject line. The errors come from
"testCacheEmptySections" and is expected to fail atm as it's pending a
fix/decision.
Your error comes from here:
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/view/helper.php#L331
with the view class coming from here:
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/view/helper.php#L315
but afaik the view class isn't added to the registry during cache
rendering.
I don't know if what you're doing is possible or a good idea.
Personally, I wouldn't think to cache a form, or try to embed a form
in a cached view. It's a whole lot easier to link to a none cached
page with a form or ajax-load the form into place upon request (like
the book's comment display/form logic).
hth,
AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---