Jump to content

[solved] product ID set to 4294967295


Recommended Posts

I'm helping out on a fresh Prestashop install. Currently, manually creating one product works, but when trying to create another one, you get the following error (with DEBUG enabled):
 
Duplicate entry '4294967295' for key 'PRIMARY'

 

Not a surprise when noticing that the first product has an ID of 4294967295 and 4294967295 is the maximum ID for an int(10)...

 

So I tried deleting this single product and creating a new one -> same ID. I even dumped the database, searched for all entries containing 4294967295, deleted them (except the ones in the ps_log), but still the same behavior!

 

Checking the MySQL logs, it becomes clear that Prestashop itself sets the ID in this line:

 

INSERT INTO `ps_product_shop` (`id_product`, `id_category_default`, `id_tax_rules_group`, `on_sale`, `online_only`, `ecotax`, `minimal_quantity`, `price`, `who$

$`, `available_now`, `available_later`, `id_lang`, `id_shop`) VALUES ('4294967295', '', '', '', 'test', 'test', '', '', '', '', '1', '1') 

 

How on earth can you avoid this clearly wrong behavior?

 

I am furthermore quite sure that it has to do with previous imports. These threads deal with the same problem:

http://bit.ly/1vgRw3R

http://bit.ly/1x7pPzw

 

I'm not so keen to export the database and upload it again as stated in the last link, I'm more into understanding why this happens and circumvent it. I want to know if Prestashop is the right choice. Currently, with this problem, it is not... :-(

 

Link to comment
Share on other sites

Well... the post really helped! Thank you El Patron!

 

I realized I had picked the wrong line in my mysql log, the id:s really aren't set manually, which of course would have been pure nonsense. From there on, setting the auto increment value to 1 did all the rest!

 

The only thing that bugs me now is not knowing WHY the value 4294967295 was set in the first hand, since the import didn't contain any barcodes or anything the like as in the translated post... :-(

 

Marking this as resolved in a few days unless someone has a good answer for that mystery as well!

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...