Post by kesaj » Mon Oct 06, 2014 5:19 pm

Dobrý deň prajem,

potreboval by som poradiť s chybou, ktorú mi vyhadzuje keď sa chcem dostať kdekoľvek do accountu :

http://www.abitec.sk/lovell/index.php?r ... ount/login

Code: Select all

Notice: Error: Could not load controller common/content_header! in /www/a/b/u56378/public_html/lovell/vqmod/vqcache/vq2-system_engine_controller.php on line 47
konrétne v tom vqchache je tento kód :

Code: Select all

<?php
abstract class Controller {
	protected $registry;	
	protected $id;
	protected $layout;
	protected $template;
	protected $children = array();
	protected $data = array();
	protected $output;
	
	public function __construct($registry) {
		$this->registry = $registry;
	}
	
	public function __get($key) {
		return $this->registry->get($key);
	}
	
	public function __set($key, $value) {
		$this->registry->set($key, $value);
	}
			
	protected function forward($route, $args = array()) {
		return new Action($route, $args);
	}

	protected function redirect($url, $status = 302) {
		header('Status: ' . $status);
		header('Location: ' . str_replace(array('&', "\n", "\r"), array('&', '', ''), $url));
		exit();				
	}
	
	protected function getChild($child, $args = array()) {
		$action = new Action($child, $args);
	
		if (file_exists($action->getFile())) {
			require_once(VQMod::modCheck($action->getFile()));

			$class = $action->getClass();

			$controller = new $class($this->registry);

			$controller->{$action->getMethod()}($action->getArgs());
			
			return $controller->output;
		} else {
			trigger_error('Error: Could not load controller ' . $child . '!');
			exit();					
		}		
	}
	
	protected function hasAction($child, $args = array()) {
		$action = new Action($child, $args);
	
		if (file_exists($action->getFile())) {
			require_once(VQMod::modCheck($action->getFile()));

			$class = $action->getClass();

			$controller = new $class($this->registry);

			if(method_exists($controller, $action->getMethod())){
				return true;
			}else{
				return false;
			}
		} else {
			trigger_error('Error: Could not load controller ' . $child . '!');
			exit();					
		}		
	}
	
  	//karapuz
	public function showTemplate($tpl_name, $data) {
	
		if (!file_exists(DIR_TEMPLATE . $tpl_name)) {
			$tpl_name = "default/template/" . $tpl_name;
		}
		
		$template = new Template();
		$template->data = $data;
		$text = $template->fetch($tpl_name);
		echo $text;
 	}
	///karapuz

			//BOF WeDoWeb Util			
			//usage: $this->setDataLang('field_name');
			protected function setDataLang($field_name)
			{
				$this->data[$field_name] = $this->language->get($field_name);
			}
			
			//usage $this->setData('width', 100);
			protected function setData($field_name, $default_value)
			{
				$this->data[$field_name] = $this->getData($field_name, $default_value);
			}
			
			//usage $width = $this->getData('width', 100);
			protected function getData($field_name, $default_value)
			{
				if (isset($this->request->post[$field_name]))
				{
					return $this->request->post[$field_name];
				}
				elseif ($this->config->has($field_name))
				{ 
					return $this->config->get($field_name);
				}
				
				return $default_value;
			}			
	
			//usage: $link_to_image = $this->getDataImage('image_field_name', 64, 64);
			//MUST load model tool/image before calling this
			protected function getDataImage($field_name, $width, $height)
			{
				if (isset($this->request->post[$field_name]) && file_exists(DIR_IMAGE . $this->request->post[$field_name]))
				{
					return $this->model_tool_image->resize($this->request->post[$field_name], $width, $height);
				}
				elseif ($this->config->has($field_name))
				{ 
					return $this->model_tool_image->resize($this->config->get($field_name), $width, $height);
				}
				else
				{
					return $this->model_tool_image->resize('no_image.jpg', $width, $height);
				}
			}
			//EOF WeDoWeb Util
			
	protected function render() {
		foreach ($this->children as $child) {
			$this->data[basename($child)] = $this->getChild($child);
		}
		
		if (file_exists(DIR_TEMPLATE . $this->template)) {
			extract($this->data);
			
      		ob_start();
      
	  		require(VQMod::modCheck(DIR_TEMPLATE . $this->template));
      
	  		$this->output = ob_get_contents();

      		ob_end_clean();
      		
			return $this->output;
    	} else {
			trigger_error('Error: Could not load template ' . DIR_TEMPLATE . $this->template . '!');
			exit();				
    	}
	}
}
?>
a v tom riadku to je táto časť :

Code: Select all

protected function getChild($child, $args = array()) {
		$action = new Action($child, $args);
	
		if (file_exists($action->getFile())) {
			require_once(VQMod::modCheck($action->getFile()));

			$class = $action->getClass();

			$controller = new $class($this->registry);

			$controller->{$action->getMethod()}($action->getArgs());
			
			return $controller->output;
		} else {
			trigger_error('Error: Could not load controller ' . $child . '!');
			exit();					
		}		
	}
Ďakujem pekne za pomoc !

Newbie

Posts

Joined
Tue Jan 14, 2014 5:49 pm

Post by hawkey » Mon Oct 06, 2014 10:33 pm

Tohel není v opencartu, to vám tam asi dává nějaká špatná šablona, protože v opencartu neexistuje content_header

Visit OpencartEx - Opencart extensions
Opencart rady a návody česky | Podpora Opencart


Active Member

Posts

Joined
Sun Apr 25, 2010 12:10 am
Location - Olomouc, Czech Republic, Europe

Post by kesaj » Tue Oct 07, 2014 4:30 pm

Zdravím,

vďaka, to som si aj myslel - len ako zistiť, ktorý doplnok mi to spôsobuje?

v téme to žiaľ nie je, lebo, keď to prepnem do default témy, tak vyhadzuje rovnakú chybu ...

Newbie

Posts

Joined
Tue Jan 14, 2014 5:49 pm

Post by hawkey » Tue Oct 07, 2014 9:36 pm

Je to v téme. Ona tam má pravděpodobně nějaké moduly a úpravy přes vqmod, přepnutí proto nestačí.
S tímhle vám nikdo neporadí bez bližšího pohledu, to chce důkladně prozkoumat, jestli to chcete dát dohromady, napište mi na hawkey@netgate.cz

Visit OpencartEx - Opencart extensions
Opencart rady a návody česky | Podpora Opencart


Active Member

Posts

Joined
Sun Apr 25, 2010 12:10 am
Location - Olomouc, Czech Republic, Europe
Who is online

Users browsing this forum: No registered users and 4 guests