Closed jiMuBao closed 10 years ago
Can you send me example for testing here, please.
You can install K2, create a K2 Item and view it from your frontend. I hope you know how to do this.
Then you create a code\com_k2\controllers\item.php
Then you copy past into this file
defined('_JEXEC') or die ;
jimport('joomla.application.component.controller');
class K2ControllerItem extends K2ControllerItemDefault
{
public function display($cachable = false, $urlparams = array())
{
die('This is my override '.__METHOD__.' at '.__FILE__);
}
}
After that view that k2 item in your front end. It now raises an error. Cannot redeclare class K2ControllerItem etc...
It tries to load the default controller again.
Thanks for update I'll test.
K2 Controller can not be override. Fatal error: Cannot redeclare class K2ControllerItem.