Jump to content

CMS backoffice not working, message "category cannot be loaded"


Recommended Posts

please turn on error reporting

i bet on some kind of sql error

it mean, that if you enable error reporting, you will see probably some error related to sql queries.

 

open config/defines.inc.php

 
find this line define('_PS_MODE_DEV_', false);
change to look like this: define('_PS_MODE_DEV_', true);
Link to comment
Share on other sites

 

please turn on error reporting

i bet on some kind of sql error

it mean, that if you enable error reporting, you will see probably some error related to sql queries.

 

open config/defines.inc.php

 
find this line define('_PS_MODE_DEV_', false);
change to look like this: define('_PS_MODE_DEV_', true);

 

Hi Vekia, thank you for your reply, I changed the dines.inc.php as you said but still have the same error.

 

About the error reporting, where do I turn it on?

Link to comment
Share on other sites

  • 10 months later...

I have te same error, in debug mode see:

 

[PrestaShopDatabaseException]

Table 'presta_presss.ps_cms_category_shop' doesn't exist
 

SELECT *FROM `ps_cms_category` aLEFT JOIN `ps_cms_category_shop` `c` ON a.id_cms_category = c.id_cms_category AND c.id_shop = 1WHERE (a.id_cms_category = 1) LIMIT 1

error is in classes/shop/Shop.php

 

i add good files http://wyslijto.pl/plik/8x40xzfubj

Link to comment
Share on other sites

  • 2 weeks later...

I am facing the same problem cms page is not loaded after i upgrade to the latest version. After i restore backup, it still show cannot load the cms page. I change configure/defines.inc.php 

define('_PS_MODE_DEV_', false); change to true. 

 

It show

SELECT *
FROM `ps_cms_category` a
LEFT JOIN `ps_cms_category_shop` `c` ON a.id_cms_category = c.id_cms_category AND c.id_shop = 1
WHERE (a.id_cms_category = 1) LIMIT 1

post-852368-0-06290600-1425278581_thumb.jpg

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

I have experienced the same problem with the error report showing that the shop does not exist but in the database the shop clearly is there. i will attach the screen report

 

 


[PrestaShopDatabaseException]

Table 'myspiri3_pre0798.yoc_cms_category_shop' doesn't exist

SELECT *

FROM `yoc_cms_category` a

LEFT JOIN `yoc_cms_category_shop` `c` ON a.id_cms_category = c.id_cms_category AND c.id_shop = 1

WHERE (a.id_cms_category = 1) LIMIT 1

at line 646 in file classes/db/Db.php

641.                   WebserviceRequest::getInstance()->setError(500, '

 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);

642.           }

643.           elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))

644.           {

645.                   if ($sql)

646.                           throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');

647.                   throw new PrestaShopDatabaseException($this->getMsgError());

648.           }

649.    }

650.

651.    /**

  • DbCore->displayError - [line 340 - classes/db/Db.php] - [1 Arguments]
  • DbCore->query - [line 558 - classes/db/Db.php] - [1 Arguments]
  • DbCore->getRow - [line 233 - classes/ObjectModel.php] - [1 Arguments]
  • ObjectModelCore->__construct - [line 43 - controllers/admin/AdminCmsContentController.php] - [1 Arguments]
  • AdminCmsContentControllerCore->__construct - [line 135 - classes/controller/Controller.php] - [2 Arguments]
  • ControllerCore::getController - [line 366 - classes/Dispatcher.php] - [1 Arguments]
  • DispatcherCore->dispatch - [line 54 - admin/index.php]
Link to comment
Share on other sites

  • 2 months later...

I am facing the same problem cms page is not loaded after i upgrade to the latest version. After i restore backup, it still show cannot load the cms page. I change configure/defines.inc.php 

define('_PS_MODE_DEV_', false); change to true. 

 

It show

SELECT *

FROM `ps_cms_category` a

LEFT JOIN `ps_cms_category_shop` `c` ON a.id_cms_category = c.id_cms_category AND c.id_shop = 1

WHERE (a.id_cms_category = 1) LIMIT 1

I've got the same problem as you.

How do you fix it??

Thanks

Link to comment
Share on other sites

  • 10 months later...
  • 1 month later...

So it seems that basically there is an issue with the database table ps_cms_category_shop the table below is froma fresh install look to your database and first make sure it exist.

If it does compare to the table below and make sure that all rows exist, If it does not copy the code below and use SQL from the top menu, paste the code in the text area and click go.

This will add the database table to your database now check and see if CMS is working.

 

 

STOP: Backup your Database by using EXPORT from the top menu, add the option to drop table if exist and export. (Just in case)

             (adding drop table will allow you to import database without having to drop all tables manually before importing backup)

 

If your database uses a different prefix other then PS change below to match your existing prefix. (5 total)

If your database is not using InnoDB you will need to change to match  ie: MyISAM

 

 

 
--
-- Table structure for table `ps_cms_category_shop`
--
 
DROP TABLE IF EXISTS `ps_cms_category_shop`;
CREATE TABLE IF NOT EXISTS `ps_cms_category_shop` (
  `id_cms_category` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_shop` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id_cms_category`,`id_shop`),
  KEY `id_shop` (`id_shop`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
 
--
-- Dumping data for table `ps_cms_category_shop`
--
 
INSERT INTO `ps_cms_category_shop` (`id_cms_category`, `id_shop`) VALUES
(1, 1);
Edited by tdr170 (see edit history)
Link to comment
Share on other sites

Hi,

 

I am not a tech by any means, but I guess I am following this topic and saw your dilemma and think I can help you a little bit.

 

I read through and if I read it correctly you are able to see the CMS pages you created, but they are empty and or missing when you try to load them.

 

My solution was fixed by doing the following..

 

If you are able to access PhpMyAdmin..

  • Check to make sure your ps_cms_lang  has the field id_shop
  • Check to make sure your ps_cms_category_language  has the field id_shop
If one or both don't have those fields you will need to add them.

 

As far as if you need help adding those fields, it wouldn't be a good idea for me to help. I just barely make it by when it comes to queries and those sort of things.

 

I hope I was able to help you.

 

Tina

www.climaticmoments.com

 

 

 

ok MY DB has MyISAM also DB contains following cms categories attached in image , also please check ps_cms tables on my shop the one you described doesnt exists

 

also check if I am doing it correct the steps you described to paste/create ps_cms_category_shopand then click go

post-411458-0-92298100-1462080822_thumb.jpg

post-411458-0-21947700-1462081025_thumb.jpg

Link to comment
Share on other sites

I got this error while trying query your provided

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`ps_cms_category_shop` ( `ps_cms_category` int(10) unsigned NOT NULL AUTO_INC' at line 1

Link to comment
Share on other sites

  • 1 month later...

So it seems that basically there is an issue with the database table ps_cms_category_shop the table below is froma fresh install look to your database and first make sure it exist.

If it does compare to the table below and make sure that all rows exist, If it does not copy the code below and use SQL from the top menu, pa

 ste the code in the text area and click go.

This will add the database table to your database now check and see if CMS is working.

 

STOP: Backup your Database by using EXPORT from the top menu, add the option to drop table if exist and export. (Just in case)

             (adding drop table will allow you to import database without having to drop all tables manually before importing backup)

 

If your database uses a different prefix other then PS change below to match your existing prefix. (5 total)

If your database is not using InnoDB you will need to change to match  ie: MyISAM

 

 

 

 

--

-- Table structure for table `ps_cms_category_shop`

--

 

DROP TABLE IF EXISTS `ps_cms_category_shop`;

CREATE TABLE IF NOT EXISTS `ps_cms_category_shop` (

  `id_cms_category` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `id_shop` int(11) unsigned NOT NULL,

  PRIMARY KEY (`id_cms_category`,`id_shop`),

  KEY `id_shop` (`id_shop`)

) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

 

--

-- Dumping data for table `ps_cms_category_shop`

--

 

INSERT INTO `ps_cms_category_shop` (`id_cms_category`, `id_shop`) VALUES

(1, 1);

Resolved the issue but now facing another issue

 

when I tried to change the order status setting I got this error

 

An error occurred while updating an object. order_state (Unknown column 'pdf_delivery' in 'field list')

 

custoemr do get order confirmation email but not getting email when order status is changed .

 

Thanks

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...