Jump to content

PrestaShopDatabaseException after Server Migration / ERROR


Recommended Posts

Hello - I have just migrated my whole PS installation  from my local machine (linux) to my hosting server, and cannot get PS to work.

I have tried everything I can think of such as removing .htaccess, importing mysql database again, clearing caches etc. 

The problem is it doesn't see PS themes. I have activated PS_MODE_DEV for you to see the error code. Please visit the website link http://www.take-5-coffee.com/

 

[PrestaShopDatabaseException]

Unknown column 'c.id_parent_category' in 'where clause'<br /><br /><pre>SELECT c.`id_jxblog_category` as id_category, cl.`name`, cl.`link_rewrite`, cs.`id_shop` FROM ps_jxblog_category c LEFT JOIN ps_jxblog_category_shop cs ON(c.`id_jxblog_category` = cs.`id_jxblog_category`) LEFT JOIN ps_jxblog_category_lang cl ON(c.`id_jxblog_category` = cl.`id_jxblog_category`)LEFT JOIN ps_jxblog_category_group cg ON(c.`id_jxblog_category` = cg.`id_jxblog_category`) WHERE c.`id_parent_category` = 2 AND cs.`id_shop` = 1 AND cg.`id_group` = 1 AND c.`active` = 1</pre>
at line 769 in file classes/db/Db.php

764. if ($webservice_call && $errno) { 765. $dbg = debug_backtrace(); 766. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97); 767. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) { 768. if ($sql) { 769. throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>'); 770. } 771. 772. throw new PrestaShopDatabaseException($this->getMsgError()); 773. } 774. }

DbCore->displayError - [line 385 - classes/db/Db.php] - [1 Arguments]

DbCore->query - [line 613 - classes/db/Db.php] - [1 Arguments]

DbCore->executeS - [line 423 - modules/jxblog/classes/JXBlogCategory.php] - [1 Arguments]

JXBlogCategory::getChildrenCategories - [line 43 - modules/jxblog/helper/HelperBlog.php] - [3 Arguments]

HelperBlog->buildFrontTree - [line 559 - modules/jxsearch/jxsearch.php] - [3 Arguments]

Jxsearch->getBlogCategoriesList - [line 677 - modules/jxsearch/jxsearch.php]

Jxsearch->hookHeader - [line 1007 - classes/Hook.php] - [1 Arguments]

HookCore::coreCallHook - [line 431 - classes/Hook.php] - [3 Arguments]

HookCore::callHookOn - [line 944 - classes/Hook.php] - [3 Arguments]

HookCore::exec - [line 598 - classes/controller/FrontController.php] - [1 Arguments]

FrontControllerCore->initContent - [line 37 - controllers/front/IndexController.php]

IndexControllerCore->initContent - [line 306 - classes/controller/Controller.php]

ControllerCore->run - [line 518 - classes/Dispatcher.php]

DispatcherCore->dispatch - [line 28 - index.php]

 

 

 

I have reviewed in my original DB, that column does not exist, so neither in the new database.

Thank you kindly for any advice, tips, fixes, solutions!

image.thumb.png.47af90f1f4cca1a2a626858459f46639.png

Link to comment
Share on other sites

It is hard to say something as I don't know anything about this "jx" system (I assume theme related modules).

The logical next step would be to check the error message:

 - it says that your 'ps_jxblog_category' table has no 'id_parent_category' field. That is easy to check. Check it both in the old and the new installation.

 

Link to comment
Share on other sites

On 8/6/2023 at 12:26 AM, AntonioPadilla said:

Hello - I have just migrated my whole PS installation  from my local machine (linux) to my hosting server, and cannot get PS to work.

I have tried everything I can think of such as removing .htaccess, importing mysql database again, clearing caches etc. 

The problem is it doesn't see PS themes. I have activated PS_MODE_DEV for you to see the error code. Please visit the website link http://www.take-5-coffee.com/

 

[PrestaShopDatabaseException]

Unknown column 'c.id_parent_category' in 'where clause'<br /><br /><pre>SELECT c.`id_jxblog_category` as id_category, cl.`name`, cl.`link_rewrite`, cs.`id_shop` FROM ps_jxblog_category c LEFT JOIN ps_jxblog_category_shop cs ON(c.`id_jxblog_category` = cs.`id_jxblog_category`) LEFT JOIN ps_jxblog_category_lang cl ON(c.`id_jxblog_category` = cl.`id_jxblog_category`)LEFT JOIN ps_jxblog_category_group cg ON(c.`id_jxblog_category` = cg.`id_jxblog_category`) WHERE c.`id_parent_category` = 2 AND cs.`id_shop` = 1 AND cg.`id_group` = 1 AND c.`active` = 1</pre>
at line 769 in file classes/db/Db.php

764. if ($webservice_call && $errno) { 765. $dbg = debug_backtrace(); 766. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97); 767. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) { 768. if ($sql) { 769. throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>'); 770. } 771. 772. throw new PrestaShopDatabaseException($this->getMsgError()); 773. } 774. }

DbCore->displayError - [line 385 - classes/db/Db.php] - [1 Arguments]

DbCore->query - [line 613 - classes/db/Db.php] - [1 Arguments]

DbCore->executeS - [line 423 - modules/jxblog/classes/JXBlogCategory.php] - [1 Arguments]

JXBlogCategory::getChildrenCategories - [line 43 - modules/jxblog/helper/HelperBlog.php] - [3 Arguments]

HelperBlog->buildFrontTree - [line 559 - modules/jxsearch/jxsearch.php] - [3 Arguments]

Jxsearch->getBlogCategoriesList - [line 677 - modules/jxsearch/jxsearch.php]

Jxsearch->hookHeader - [line 1007 - classes/Hook.php] - [1 Arguments]

HookCore::coreCallHook - [line 431 - classes/Hook.php] - [3 Arguments]

HookCore::callHookOn - [line 944 - classes/Hook.php] - [3 Arguments]

HookCore::exec - [line 598 - classes/controller/FrontController.php] - [1 Arguments]

FrontControllerCore->initContent - [line 37 - controllers/front/IndexController.php]

IndexControllerCore->initContent - [line 306 - classes/controller/Controller.php]

ControllerCore->run - [line 518 - classes/Dispatcher.php]

DispatcherCore->dispatch - [line 28 - index.php]

 

 

 

I have reviewed in my original DB, that column does not exist, so neither in the new database.

Thank you kindly for any advice, tips, fixes, solutions!

image.thumb.png.47af90f1f4cca1a2a626858459f46639.png

I reinstalled the module jxblog

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...