zikula/core — Issue #147: Fatal error when caching is enabled and there is a $_POST request
Author: tfotis
Created: 2011-10-16 11:03:52+00:00
State: open

It seems that render plugins are not loaded when caching is enabled and you issue a post request.

to replicate
1) enable render caching
2) enter wrong credentials in the login form

Tracking down the issue led me to this line of code https://github.com/zikula/core/blob/release-1.3/src/lib/Zikula/View.php#L292

According to this line, "nocache plugins" are loaded when caching is enabled. However, when a `$_POST` is issued, Zikula disables caching, so these plugins aren't loaded. And this leads to a fatal error.

Removing `$this->caching` from the if statement fixes the error, but it raises two questions
1) if these plugins are loaded when caching is on, then how come they are working in the first place when caching is disabled?
2) why are these plugins loaded only when caching is on?