Página 1 de 1

Uncaught Error: Call to a member function link()

Enviado: 29 Abr 2019, 17:07
por João Vitor Dias
Recentemente eu importei os arquivos de meu site para a máquina que estou utilizando atualmente e configurei os arquivos config.php e admin/config.php e outros (utilizo XAMPP).

Porém, quando tento acessar o site ocorre o seguinte erro:
Fatal error: Uncaught Error: Call to a member function link() on null in C:\xampp1\htdocs\shop1\admin\controller\error\not_found.php:16 Stack trace: #0 C:\xampp1\htdocs\shop1\system\storage\modification\system\engine\action.php(51): ControllerErrorNotFound->index() #1 C:\xampp1\htdocs\shop1\system\engine\front.php(59): Action->execute(Object(Registry)) #2 C:\xampp1\htdocs\shop1\system\engine\front.php(52): Front->execute(Object(Action)) #3 C:\xampp1\htdocs\shop1\system\framework.php(214): Front->dispatch(Object(Action), Object(Action)) #4 C:\xampp1\htdocs\shop1\system\startup.php(124): require_once('C:\\xampp1\\htdoc...') #5 C:\xampp1\htdocs\shop1\index.php(24): start('catalog') #6 {main} thrown in C:\xampp1\htdocs\shop1\admin\controller\error\not_found.php on line 16

essa é a configuração dos arquivos config.php e admin/config.php.

config.php:
Código: Selecionar todos
<?php
// HTTP
define('HTTP_SERVER', 'http://localhost/shop1/');

// HTTPS
define('HTTPS_SERVER', 'https://localhost/shop1/');

// DIR
define('DIR_APPLICATION', '../shop1/admin/');
define('DIR_SYSTEM', '../shop1/system/');
define('DIR_IMAGE', '../shop1/image/');
define('DIR_LANGUAGE', '../shop1/admin/language/');
define('DIR_TEMPLATE', '../shop1/admin/view/template/');
define('DIR_CONFIG', '../shop1/system/config/');
define('DIR_CACHE', '../shop1/system/storage/cache/');
define('DIR_DOWNLOAD', '../shop1/system/storage/download/');
define('DIR_LOGS', '../shop1/system/storage/logs/');
define('DIR_MODIFICATION', '../shop1/system/storage/modification/');
define('DIR_UPLOAD', '../shop1/system/storage/upload/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'xxxx');
define('DB_USERNAME', 'xxxx');
define('DB_PASSWORD', 'xxxx');
define('DB_DATABASE', 'xxxx');
define('DB_PORT', 'xxxx');
define('DB_PREFIX', 'xxxx');
--------------------------------------
admin/config.php
Código: Selecionar todos
<?php
// HTTP
define('HTTP_SERVER', 'http://localhost/shop1/admin');
define('HTTP_CATALOG', 'http://localhost/shop1/');


// HTTPS
define('HTTPS_SERVER', 'http://localhost/shop1/');
define('HTTP_CATALOG', 'https://localhost/shop1/');

// DIR
define('DIR_APPLICATION', '../shop1/admin/');
define('DIR_SYSTEM', '../shop1/system/');
define('DIR_IMAGE', '../shop1/image/');
define('DIR_LANGUAGE', '../shop1/admin/language/');
define('DIR_TEMPLATE', '../shop1/admin/view/template/');
define('DIR_CONFIG', '../shop1/system/config/');
define('DIR_CACHE', '../shop1/system/storage/cache/');
define('DIR_DOWNLOAD', '../shop1/system/storage/download/');
define('DIR_LOGS', '../shop1/system/storage/logs/');
define('DIR_MODIFICATION', '../shop1/system/storage/modification/');
define('DIR_UPLOAD', '../shop1/system/storage/upload/');
define('DIR_CATALOG', '../shop1/catalog/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'xxxx');
define('DB_USERNAME', 'xxxx');
define('DB_PASSWORD', 'xxxx');
define('DB_DATABASE', 'xxxx');
define('DB_PORT', 'xxxx');
define('DB_PREFIX', 'xxxx');
Alguém poderia me ajudar, por favor? Preciso resolver este problema o quanto antes.

Agradeço desde já.

Re: Uncaught Error: Call to a member function link()

Enviado: 30 Abr 2019, 21:45
por jano
Qual é a sua versão do Opencart?

Re: Uncaught Error: Call to a member function link()

Enviado: 01 Mai 2019, 11:05
por Manoel Vidal
Olá @João Vitor Dias.

Verifique se de fato você baixou todos os arquivos da loja para seu ambiente local e limpe o cache do OpenCart.

Espero ter ajudado. :D