Piwik 1.6 and CAS plugin issues

We had Piwik 1.5 running with the CAS plugin without any problems, but after upgrading to Piwik 1.6 it started barfing errors:


Notice: Undefined index: isCustomLogo in /data/piwik/tmp/templates_c/%%A9^A91^A917CA4A%%header.tpl.php on line 73 

Backtrace -->
#0 Piwik_ErrorHandler(...) called at [/data/piwik/tmp/templates_c/%%A9^A91^A917CA4A%%header.tpl.php:73]#1 include(...) called at [/data/piwik/libs/Smarty/Smarty.class.php:1869]#2 Smarty->_smarty_include(...) called at [/data/piwik/tmp/templates_c/%%45^45A^45A11949%%login.tpl.php:6]#3 include(...) called at [/data/piwik/libs/Smarty/Smarty.class.php:1263]#4 Smarty->fetch(...) called at [/data/piwik/core/View.php:139]#5 Piwik_View->render(...) called at [/data/piwik/plugins/CASLogin/Controller.php:59]#6 Piwik_CASLogin_Controller->login(...) called at [:]#7 call_user_func_array(...) called at [/data/piwik/core/FrontController.php:132]#8 Piwik_FrontController->dispatch(...) called at [/data/piwik/index.php:53]


Notice: Undefined index: logoLarge in /data/piwik/tmp/templates_c/%%A9^A91^A917CA4A%%header.tpl.php on line 75 

Backtrace -->
#0 Piwik_ErrorHandler(...) called at [/data/piwik/tmp/templates_c/%%A9^A91^A917CA4A%%header.tpl.php:75]#1 include(...) called at [/data/piwik/libs/Smarty/Smarty.class.php:1869]#2 Smarty->_smarty_include(...) called at [/data/piwik/tmp/templates_c/%%45^45A^45A11949%%login.tpl.php:6]#3 include(...) called at [/data/piwik/libs/Smarty/Smarty.class.php:1263]#4 Smarty->fetch(...) called at [/data/piwik/core/View.php:139]#5 Piwik_View->render(...) called at [/data/piwik/plugins/CASLogin/Controller.php:59]#6 Piwik_CASLogin_Controller->login(...) called at [:]#7 call_user_func_array(...) called at [/data/piwik/core/FrontController.php:132]#8 Piwik_FrontController->dispatch(...) called at [/data/piwik/index.php:53]


Notice: Undefined index: isCustomLogo in /data/piwik/tmp/templates_c/%%A9^A91^A917CA4A%%header.tpl.php on line 78 

Backtrace -->
#0 Piwik_ErrorHandler(...) called at [/data/piwik/tmp/templates_c/%%A9^A91^A917CA4A%%header.tpl.php:78]#1 include(...) called at [/data/piwik/libs/Smarty/Smarty.class.php:1869]#2 Smarty->_smarty_include(...) called at [/data/piwik/tmp/templates_c/%%45^45A^45A11949%%login.tpl.php:6]#3 include(...) called at [/data/piwik/libs/Smarty/Smarty.class.php:1263]#4 Smarty->fetch(...) called at [/data/piwik/core/View.php:139]#5 Piwik_View->render(...) called at [/data/piwik/plugins/CASLogin/Controller.php:59]#6 Piwik_CASLogin_Controller->login(...) called at [:]#7 call_user_func_array(...) called at [/data/piwik/core/FrontController.php:132]#8 Piwik_FrontController->dispatch(...) called at [/data/piwik/index.php:53]


Notice: Undefined index: isCustomLogo in /data/piwik/tmp/templates_c/%%A9^A91^A917CA4A%%header.tpl.php on line 85 

Backtrace -->
#0 Piwik_ErrorHandler(...) called at [/data/piwik/tmp/templates_c/%%A9^A91^A917CA4A%%header.tpl.php:85]#1 include(...) called at [/data/piwik/libs/Smarty/Smarty.class.php:1869]#2 Smarty->_smarty_include(...) called at [/data/piwik/tmp/templates_c/%%45^45A^45A11949%%login.tpl.php:6]#3 include(...) called at [/data/piwik/libs/Smarty/Smarty.class.php:1263]#4 Smarty->fetch(...) called at [/data/piwik/core/View.php:139]#5 Piwik_View->render(...) called at [/data/piwik/plugins/CASLogin/Controller.php:59]#6 Piwik_CASLogin_Controller->login(...) called at [:]#7 call_user_func_array(...) called at [/data/piwik/core/FrontController.php:132]#8 Piwik_FrontController->dispatch(...) called at [/data/piwik/index.php:53]

It is possible to login because the ‘Sign in’ link is still shown and working. But I’d rather get rid of the errors.

Hmm, did you try to clear the content of the named tmp directory or at least templates_c ?
Maybe the CAS plugin needs to be upgraded to Piwik 1.6.

Neither one of the solutions worked. Cleared the content of both directories but still the same error messages.

I fixed the issue after reading about similar error message in other plugins. The solution is to add a single line in Controller.php. In function configureView add the following line


$this->setBasicVariablesView($view);

so it reads


	private function configureView($view)
	{
		$this->setBasicVariablesView($view);
		$view->linkTitle = Piwik::getRandomTitle();

I created a new version of the plugin. You can download CASLogin-0.6.3.tgz from Plugin to provide Login via Central Authentication Service (CAS) · Issue #598 · matomo-org/matomo · GitHub