Jump to content

[Solved] Fatal error - Uncaught Unknown column


Recommended Posts

I've recently moved my store to a new hosting, but after uploading all the files to the server, imported the database etc., I'm getting the following error:

 

Fatal error: Uncaught Unknown column 'c.id_shop_group' in 'field list'<br /><br /><pre>SELECT c.`name`, cl.`id_lang`, IF(cl.`id_lang` IS NULL, c.`value`, cl.`value`) AS value, c.id_shop_group, c.id_shop FROM `hw_configuration` c LEFT JOIN `hw_configuration_lang` cl ON (c.id_configuration = cl.id_configuration)</pre> thrown in /home/xxx/public_html/classes/db/Db.php on line 613

 

For me, it looks like a problem with the dabase missing a column or something :S. Any ideas about how to solve this?

 

Thanks in advance.

Edited by moy2010 (see edit history)
Link to comment
Share on other sites

Hi, Nemo1. Thanks for your help :).

 

I went to PHPMyAdmin, clicked on hw_configuration and then in structure. After that I created a column named id_shop_group with the 12 (INT) type and saved it.

 

I can see it now listed in the structure but the error persists :S.

Link to comment
Share on other sites

A brief update. The previous error has been fixed, but now I'm getting this:

 

Column 'id_shop_group' cannot be null
 

INSERT INTO `hw_configuration` (`name`, `id_shop_group`, `id_shop`, `value`, `date_add`, `date_upd`) VALUES ('update_dboptimization', NULL, NULL, '1385373785', '2013-11-25 04:03:05', '2013-11-25 04:03:05')

 

Does this mean that I have to give it a value manually? If this, then which value?

Link to comment
Share on other sites

Hi, Nemo1. This error was caused by a module named dboptimization, and I've deleted it. Now I'm getting the following error:

 

No access reference in table module_access for id_module 296.
at line 1814 in file classes/module/Module.php

 

Even if I delete the module with that ID, the same error appears but only changes the id_module :S.

Link to comment
Share on other sites

Hi, Nemo. It's done now. I've finally been able to see the login screen for the B.O., but once I login I get this error:

 

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /home/pcxcommx/public_html/classes/shop/Shop.php on line 768

[PrestaShopDatabaseException]

Unknown column 'id_shop' in 'where clause'
 

            SELECT IFNULL(SUM(`total_paid_real` / conversion_rate), "0") as total_sales, COUNT(*) as total_orders
            FROM `hw_orders`
            WHERE valid = 1
                AND `invoice_date` BETWEEN '2013-11-01 00:00:00' AND '2013-11-31 23:59:59'
                 AND id_shop IN (0)
         LIMIT 1
Link to comment
Share on other sites

Done. After adding some other columns to different tabs, I'm now at the backoffice. I had to go to the SEO & URL menu to change some few things, but I'm getting this error again:

 

Column 'id_shop_group' cannot be null

INSERT INTO `hw_configuration` (`name`, `id_shop_group`, `id_shop`, `value`, `date_add`, `date_upd`) VALUES ('PS_ALLOW_ACCENTED_CHARS_URL', NULL, NULL, '0', '2013-11-25 04:57:26', '2013-11-25 04:57:26')

 

Seems that this will take longer than what I expected >.<

Link to comment
Share on other sites

  • 8 months later...
×
×
  • Create New...