Jump to content

SQL ERROR


adminraju123

Recommended Posts

That error message means there's a programming error in the SQL query that is saving to the ps_product tables. Try editing config/defines.inc.php and changing the value of _PS_MODE_DEV_ from false to true. That should display an error message showing the SQL query and the error message.

Link to comment
Share on other sites

It seems something is trying to load the class ProductController, which doesn't exist. PrestaShop only has the class ProductControllerCore by default. Maybe there's an override that is extending the wrong class? Check whether override/controllers/front/ProductController.php exists.

 

It's hard to know without actually inspecting your website.

Link to comment
Share on other sites

It would seem that some code is expecting there to be an override there and failing when it's not found. As a temporary fix, you can try creating override/controllers/front/ProductController.php with the following:

<?php

class ProductController extends ProductControllerCore
{

}

This will create the class that the code is looking for, though it would really be better to know what code is attempting to call it.

Link to comment
Share on other sites

Now in front end its showing perfect but admin panel its showing this type of error

 

Duplicate entry '0' for key 'PRIMARY'

 
INSERT INTO `cineultima_ps_product` (`id_shop_default`, `id_manufacturer`, `id_supplier`, `reference`, `supplier_reference`, `location`, `width`, `height`, `depth`, `weight`, `quantity_discount`, `ean13`, `upc`, `cache_is_pack`, `cache_has_attachments`, `is_virtual`, `id_category_default`, `id_tax_rules_group`, `on_sale`, `online_only`, `ecotax`, `minimal_quantity`, `price`, `wholesale_price`, `unity`, `unit_price_ratio`, `additional_shipping_cost`, `customizable`, `text_fields`, `uploadable_files`, `active`, `redirect_type`, `id_product_redirected`, `available_for_order`, `available_date`, `condition`, `show_price`, `indexed`, `visibility`, `cache_default_attribute`, `advanced_stock_management`, `date_add`, `date_upd`, `pack_stock_type`) VALUES ('1', '0', '0', '', '', '', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '2', '2', '0', '0', '0', '1', '0', '0', '', '0', '0', '0', '0', '0', '1', '404', '0', '1', '0000-00-00', 'new', '1', '0', 'both', '0', '0', '2016-10-20 01:31:55', '2016-10-20 01:31:55', '3')
Link to comment
Share on other sites

That SQL query is missing the `id_product` field, so it's being inserted without a product ID, which is causing duplicates.

 

I have no idea what would cause it. Maybe you should just start over with a clean installation of PrestaShop? Your current installation is seriously messed up. :(

Link to comment
Share on other sites

I think it's going to hard to fix without actually inspecting your website. There must be an obscure bug somewhere.

 

Perhaps the AUTO_INCREMENT on the ps_product table is wrong? You can change it using the query:

ALTER TABLE ps_product AUTO_INCREMENT = 1000

Check the highest ID of your products and change 1000 in the query to the next ID after that one.

Link to comment
Share on other sites

This table looks like same what you sent but In prestashop in database  product_lang table why is this showing "Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available." in prestashop is this table we can not edit delete data

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