zikula/core — Issue #152: plugin block.checkpermissionblock is not working when caching is enabled
Author: tfotis
Created: 2011-10-21 11:52:28+00:00
State: open

When you use checkpermissionblock and caching is on, your variables aren't available inside the block.

To replicate enable caching and put the following code inside a module's template (eg search_user_form.tpl)

```php
{assign var='myvar' value='1'}
{checkpermissionblock component='::' instance='::' level=ACCESS_OVERVIEW}
{$myvar}
{/checkpermissionblock}
```

When caching is off or caching is on and the template isn't cached yet, you should see '1'. As soon as the template is cached, you will see a notice

```
NOTICE (5): E_NOTICE: Undefined index: myvar in src/ztemp/view_compiled/Search/search_user_form--t_Andreas08-l_en.inc line 29
```

The strange thing is that if you use the above code inside a theme template (eg home.tpl), it works as expected.