Jump to content

Prestashop 1.7.2 HTTP Error 500


ianm

Recommended Posts

Good day, I created new products and then encountered this message in "HTTP Error 500".

In CPanel I open config/defines.inc.php and changed:

From -  define('_PS_MODE_DEV_', false);

To - define('_PS_MODE_DEV_', true);

I then got the following message, and not sure how to fix this:

PrestaShopDatabaseException in Db.php line 744:Duplicate entry '98-0-0-0-2017-08-20 00:00:00-2017-08-23 00:00:00-1-0-0-0-0-1-1' for key 'id_product_2'<br /><br /><pre>INSERT INTO `ps2p_specific_price` (`id_shop_group`, `id_shop`, `id_cart`, `id_product`, `id_product_attribute`, `id_currency`, `id_specific_price_rule`, `id_country`, `id_group`, `id_customer`, `price`, `from_quantity`, `reduction`, `reduction_tax`, `reduction_type`, `from`, `to`) VALUES ('0', '1', '0', '98', '0', '0', '1', '0', '0', '0', '-1', '1', '0.25', '1', 'percentage', '2017-08-20 00:00:00', '2017-08-23 00:00:00')</pre>

  1. in Db.php line 744
  2. at DbCore->displayError('INSERT INTO `ps2p_specific_price` (`id_shop_group`, `id_shop`, `id_cart`, `id_product`, `id_product_attribute`, `id_currency`, `id_specific_price_rule`, `id_country`, `id_group`, `id_customer`, `price`, `from_quantity`, `reduction`, `reduction_tax`, `reduction_type`, `from`, `to`) VALUES ('0', '1', '0', '98', '0', '0', '1', '0', '0', '0', '-1', '1', '0.25', '1', 'percentage', '2017-08-20 00:00:00', '2017-08-23 00:00:00')') in Db.php line 378
  3. at DbCore->query('INSERT INTO `ps2p_specific_price` (`id_shop_group`, `id_shop`, `id_cart`, `id_product`, `id_product_attribute`, `id_currency`, `id_specific_price_rule`, `id_country`, `id_group`, `id_customer`, `price`, `from_quantity`, `reduction`, `reduction_tax`, `reduction_type`, `from`, `to`) VALUES ('0', '1', '0', '98', '0', '0', '1', '0', '0', '0', '-1', '1', '0.25', '1', 'percentage', '2017-08-20 00:00:00', '2017-08-23 00:00:00')') in Db.php line 716
  4. at DbCore->q('INSERT INTO `ps2p_specific_price` (`id_shop_group`, `id_shop`, `id_cart`, `id_product`, `id_product_attribute`, `id_currency`, `id_specific_price_rule`, `id_country`, `id_group`, `id_customer`, `price`, `from_quantity`, `reduction`, `reduction_tax`, `reduction_type`, `from`, `to`) VALUES ('0', '1', '0', '98', '0', '0', '1', '0', '0', '0', '-1', '1', '0.25', '1', 'percentage', '2017-08-20 00:00:00', '2017-08-23 00:00:00')', true) in Db.php line 467
  5. at DbCore->insert('specific_price', array('id_shop_group' => '0', 'id_shop' => '1', 'id_cart' => '0', 'id_product' => '98', 'id_product_attribute' => '0', 'id_currency' => '0', 'id_specific_price_rule' => '1', 'id_country' => '0', 'id_group' => '0', 'id_customer' => '0', 'price' => '-1', 'from_quantity' => '1', 'reduction' => '0.25', 'reduction_tax' => '1', 'reduction_type' => 'percentage', 'from' => '2017-08-20 00:00:00', 'to' => '2017-08-23 00:00:00'), false) in ObjectModel.php line 518
  6. at ObjectModelCore->add(true, false) in SpecificPrice.php line 109
  7. at SpecificPriceCore->add() in SpecificPrice.php line 513
  8. at SpecificPriceCore->duplicate('98') in Product.php line 4208
  9. at ProductCore::duplicateSpecificPrices('20', '98') in AdminProductDataUpdater.php line 198
  10. at AdminProductDataUpdater->duplicateProduct('20') in ProductController.php line 833
  11. at ProductController->unitAction('duplicate', '20')
  12. at call_user_func_array(array(object(ProductController), 'unitAction'), array('duplicate', '20')) in bootstrap.php.cache line 3247
  13. at HttpKernel->handleRaw(object(Request), '1') in bootstrap.php.cache line 3206
  14. at HttpKernel->handle(object(Request), '1', false) in bootstrap.php.cache line 3360
  15. at ContainerAwareHttpKernel->handle(object(Request), '1', false) in bootstrap.php.cache line 2562
  16. at Kernel->handle(object(Request), '1', false) in index.php line 86
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...