- RobertoDS
- RO CSVI
- Tuesday, 02 September 2025
- Subscribe via email
I'm trying to import the category tree but i'm getting "Duplicate entry '0' for key 'PRIMARY'" error and I don't know how to do it
Attachments (1)
0
Accepted Answer
Pending Moderation
Hello,
Thank you for posting the file. With your import file import finished without any errors. See attached screenshot. Can you clean the broken category records from your previous imports and then run the import? You can use Remove empty categories operation in Maintenance for VirtueMart to do that. Run import and see if that helps.
Thank you for posting the file. With your import file import finished without any errors. See attached screenshot. Can you clean the broken category records from your previous imports and then run the import? You can use Remove empty categories operation in Maintenance for VirtueMart to do that. Run import and see if that helps.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
Hello,
Can you post the import file as requested? I will run the import in my test site and check.
Can you post the import file as requested? I will run the import in my test site and check.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
Hello,
Please post the import file used. I will run the import and check.
Please post the import file used. I will run the import and check.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
Actually... in the second attempt Itried with the "products_per_row" field set to 1 and also without setting it up..
always Duplicate entry '0' for key 'PRIMARY' error
always Duplicate entry '0' for key 'PRIMARY' error
Attachments (1)
Accepted Answer
Pending Moderation
Hello,
If I run the query from your debug log I see error Data too long for column 'products_per_row' at row 1 and that is because products_per_row value is 24 in import file. VirtueMart has this field definition set to varchar(1) so it can take only one digit. That must be the reason for Duplicate entry '0' for key 'PRIMARY' error. Either change this value in import file or change products_per_row field definition in #__virtuemart_categories table. Check if that solves the error.
If I run the query from your debug log I see error Data too long for column 'products_per_row' at row 1 and that is because products_per_row value is 24 in import file. VirtueMart has this field definition set to varchar(1) so it can take only one digit. That must be the reason for Duplicate entry '0' for key 'PRIMARY' error. Either change this value in import file or change products_per_row field definition in #__virtuemart_categories table. Check if that solves the error.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »