Migrated pricing error

Hello There,
 
Going through our magento 2 site and checking things it appears that some of our prices migrated over and doubled in price.
Is this any kind of known bug and how can it be fixed?
Here are two example product links to the M1 and M2 dev sites.
 
http://mag23.marcusuniforms.com/catalog/product/view/id/516476/s/wonderwink-seven-flex-women-s-fashion-crossover-to/category/274/
https://marcusuniforms.com/wonderwink-seven-flex-women-s-fashion-crossover-to.html
 
Thank you

  1. Hello There.we have just purchased the support.We are currently facing two issues.1. step 5 gives me the error ubuntu@ip-172-31-17-186:/var/www/magento$ php -f bin/ubdatamigration run --step=5[Processing][run] in step #5: ......................Status: failMessage: CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND entity_id = 534027 LIMIT 1' at line 1. The SQL statement executed was: SELECT * FROM `catalog_product_entity_int` `t` WHERE attribute_id = 341 AND value = AND entity_id = 534027 LIMIT 1ubuntu@ip-172-31-17-186:/var/www/magento$2. Category migration completed but it did not migrate all the categories.Thanks

18 answers

Profile photo of ubdev Staff 98150.00 $tone January 10, 2020
Public

Hi there, 
This might relate to the catalog pricing rule, not our migration tool.
You can cross check directly in your migrated database compared with your M1 database.
There’s a high chance that it relates to your 3rd party setting in M1.
So please check this again at your end.
Regards,
Ubertheme team

#1
Profile photo of Mall Staff 184060.00 $tone September 29, 2020
Public

Hi there,

We are currently facing two issues.1. step 5 gives me the error ubuntu@ip-172-31-17-186:/var/www/magento$ php -f bin/ubdatamigration run --step=5[Processing][run] in step #5: ………………….Status: failMessage: CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘AND entity_id = 534027 LIMIT 1’ at line 1. The SQL statement executed was: SELECT * FROM `catalog_product_entity_int` `t` WHERE attribute_id = 341 AND value = AND entity_id = 534027

That issue occurred because your M1 database had at least one bad data record in the ‘catalog_product_super_attribute_pricing’ table. These data records had a relation with a none-existing attribute options in the ‘eav_attribute_option’ table.

To solve that issue, you can follow these steps:

+ Run following SQL query in your M1 database to delete the bad data records mentioned above:

DELETE FROM catalog_product_super_attribute_pricing WHERE value_index IS NULL OR value_index = '' OR value_index NOT IN (SELECT option_id FROM eav_attribute_option);

+ Once done, you can continue with data migration in step #5 by running the CLI command:

php -f bin/ubdatamigration run --step=5;

Category migration completed but it did not migrate all the categories.

Did you check all categories in the settings of Step #4 to migrate? Did you get any related error message in step #4?
Please verify again the migrated categories in the table named ‘catalog_category_entity’ in your M2 database.

Regards,
Mall.

 

#2
Profile photo of Mall Staff 184060.00 $tone September 29, 2020
Public

Hi there,

Step 5 is running again now. 
The category table has 567 records but only 66 of them migrated

So, please pause the data migration in step #5. And then consider finishing data migration in step #4 (migrating categories) first.

Meanwhile, please help to answer my question in my reply #2:

Did you check all categories in the settings of Step #4 to migrate? Did you get any related error message in step #4?

Regards,
Mall.

#4
Profile photo of ubdev Staff 98150.00 $tone September 29, 2020
Public

Hi there,

Yes we checked all categories for step 4. The problem is step 4 thinks it is finished so it doesn’t let me restart it and if I reset it and run it again I get the same result.

So, please provide us the following info, we will check further and get back to you then: 

  • URL and admin credentials of your M2 instance
  • SSH credentials of your M2 instance
  • Let us know the path to your M2 folder

PS1. Please make sure you mark your reply private or simply switch this ticket to the private mode. Then it’s safe to share your site info here. 
PS2. Since we do not provide technical support via email, please help to add a direct reply via this ticket (not sending a reply via email notification). 
Regards,
Ubertheme team

#5
Profile photo of biitsllc123 460.00 $tone September 29, 2020
Public

Also this error has happened now on step 5
 
Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘1814047’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `catalog_product_super_attribute` (`product_id`, `attribute_id`, `position`, `product_super_attribute_id`) VALUES (:yp0, :yp1, :yp2, :yp3)

#7
Profile photo of ubdev Staff 98150.00 $tone September 29, 2020
Public

Hi there, 

we got this error https://prnt.sc/uppy29 

Please try to manually re-update the setting data in the store_group table in M2 database. And make sure that the root_category_id assigned to each Store is existing in the catalog_category_entity table: https://prnt.sc/uprbhv

The category table has 567 records but only 66 of them migrated

We checked further into that issue. We noticed that our module detected that your M1 had 566 categories: https://prnt.sc/upr79d
And all 566 categories have been migrated by our module: https://prnt.sc/upr7x1
So, please check on both points we mentioned above again. 

Regards,
Ubertheme team

#10
Profile photo of biitsllc123 460.00 $tone September 29, 2020
Public

That is interesting.
When we ran it, it said something like 66 categories completed and ended. I guess they finished.
 
Now I am getting this on migrating orders.
Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘2536’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `sales_order_grid` (`entity_id`, `status`, `store_id`, `store_name`, `customer_id`, `base_grand_total`, `base_total_paid`, `grand_total`, `total_paid`, `increment_id`, `base_currency_code`, `order_currency_code`, `shipping_name`, `billing_name`, `created_at`, `updated_at`, `customer_email`, `customer_group`, `customer_name`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9, :yp10, :yp11, :yp12, :yp13, :yp14, :yp15, :yp16, :yp17, :yp18)
 

#11
Profile photo of Mall Staff 184060.00 $tone September 29, 2020
Public

Hi there,

constraint violation: 1062 Duplicate entry ‘2536’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `sales_order_grid` (`entity_id`, `status`, `store_id`, `store_name`,

To solve that issue, you can do steps as follows:
1. Run the following SQL query in your M2 database:

Delete From sales_order_grid Where entity_id = 2536;

2. And then, you can continue with the data migration in step #7 as normal. 

Regards,
Mall.

#12
Profile photo of biitsllc123 460.00 $tone September 29, 2020
Public

Hello there,
 
We resolved the category page opening issue and I see all the categories there.
Now we get this on step 7
 
 
Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘589240’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `quote_item` (`quote_id`, `no_discount`, `weight`, `qty`, `price`, `base_price`, `discount_percent`, `discount_amount`, `base_discount_amount`, `tax_percent`, `tax_amount`, `base_tax_amount`, `row_total`, `base_row_total`, `row_total_with_discount`, `row_weight`, `free_shipping`, `item_id`, `created_at`, `updated_at`, `product_id`, `store_id`, `is_virtual`, `sku`, `name`, `applied_rule_ids`, `is_qty_decimal`, `embroidery_price`, `r_monogram_style`, `r_monoinput_line1`, `r_monoinput_line2`, `r_monoinput_line3`, `rinput_line1`, `rinput_line2`, `thread_color`, `right_font_value`, `right_chestlogo`, `rchest_logo_color`, `l_monogram_style`, `l_monoinput_line1`, `l_monoinput_line2`, `l_monoinput_line3`, `linput_line1`, `linput_line2`, `left_thread_color`, `left_font_value`, `left_chestlogo`, `lchest_logo_color`, `s_color`, `s_size`, `product_type`, `price_incl_tax`, `base_price_incl_tax`, `row_total_incl_tax`, `base_row_total_incl_tax`, `discount_tax_compensation_amount`, `base_discount_tax_compensation_amount`, `weee_tax_applied`, `weee_tax_applied_amount`, `weee_tax_applied_row_amount`, `weee_tax_disposition`, `weee_tax_row_disposition`, `base_weee_tax_applied_amount`, `base_weee_tax_disposition`, `base_weee_tax_row_disposition`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9, :yp10, :yp11, :yp12, :yp13, :yp14, :yp15, :yp16, :yp17, :yp18, :yp19, :yp20, :yp21, :yp22, :yp23, :yp24, :yp25, :yp26, :yp27, :yp28, :yp29, :yp30, :yp31, :yp32, :yp33, :yp34, :yp35, :yp36, :yp37, :yp38, :yp39, :yp40, :yp41, :yp42, :yp43, :yp44, :yp45, :yp46, :yp47, :yp48, :yp49, :yp50, :yp51, :yp52, :yp53, :yp54, :yp55, :yp56, :yp57, :yp58, :yp59, :yp60, :yp61, :yp62, :yp63, :yp64)

#13
Profile photo of Mall Staff 184060.00 $tone September 29, 2020
Public

Hi there,

1062 Duplicate entry ‘589240’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `quote_item` (`quote_id`, `no_discount`, `weight`, `qty`, `price`, `base_price`, `discount_percent`,

Let’s try with steps as following:
1. Run the following SQL in your M2 database:

Delete From quote_item Where item_id = 589240;

2. And then you continue with data migration in step #7.
Regards,
Mall.
 
 

#14
Profile photo of biitsllc123 460.00 $tone September 29, 2020
Public

I also see there is an error on products step 5 now as well. not sure what changed but syncing those shws this
 
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘1814050’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `catalog_product_super_attribute` (`product_id`, `attribute_id`, `position`, `product_super_attribute_id`) VALUES (:yp0, :yp1, :yp2, :yp3)
ubuntu@ip-172-31-17-186:/var/www/magento$

#15
Profile photo of Mall Staff 184060.00 $tone September 30, 2020
Public

Hi there,

Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘1814050’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `catalog_product_super_attribute` (`product_id`, `attribute_id`,

To solve that issue, you can do steps below:

1. Run the following SQL query in your M2 database to delete the duplicated record:

Delete From catalog_product_super_attribute Where product_super_attribute_id = '1814050';

2. And then, you continue with the data migration in step #5.

Please note that in order ensure full data relationship, you should finish data migration in step #5 before you do data migration in step #7.

Regards,
Mall.

#16
Profile photo of biitsllc123 460.00 $tone September 30, 2020
Public

I have started over because of to many errors. I am now at step 5 again and it tells me Reminder! You have to complete all settings in the step #4 (Categories) first
Step 4 shows as completed though and all of my categories are in the table.

#17
Profile photo of ubdev Staff 98150.00 $tone October 1, 2020
Public

Hi there, 
We noticed that your M2 instance is v2.3.3 with our module v3.2.2. Please consider upgrading our module to the latest version 3.2.4.

PW: uses a key file. How can I get that to you?

If the issue still persists, then provide us the SSH key (you can send over via info (at) ubertheme.com). We will follow up further then. 
Regards,
Ubertheme team

#18

Please login or Register to Submit Answer

Written By

Comments