Dear Sir/Madam, we are migrating from Magento 1.9 to 2.3.0 and getting a problem on step 7…
Mage2SalesQuoteItem: Tax Amount is too long (maximum is 12 characters).
-- Base Tax Amount is too long (maximum is 12 characters).
Mage2SalesQuoteItem: Tax Amount is too long (maximum is 12 characters).
-- Base Tax Amount is too long (maximum is 12 characters).
Yours hopefully
Tony
22 answers
Hi there,
Mage2SalesQuoteItem: Tax Amount is too long (maximum is 12 characters).
— Base Tax Amount is too long (maximum is 12 characters).
That issue because your M1 database has at least one record which has bad data with new rules of M2 database on the value of fields:
sales_flat_quote_item.tax_amount, sales_flat_quote_item.base_tax_amount
To handle for that, you could do:
+ Open the PHP file at path: pub/ub-tool/protected/controllers/Step7Controller.php
and find to the code line:
'row_total_incl_tax', 'base_row_total_incl_tax', 'qty')) AND strlen(trim($val)) > 12) {
and replace it by code line:
'row_total_incl_tax', 'base_row_total_incl_tax', 'qty', 'tax_amount', 'base_tax_amount')) AND strlen(trim($val)) > 12) {
Note: There are two lines in above PHP file you need to replace.
+ Once done, you could continue with data migration in step #7:
php -f bin/ubdatamigration run --step=7;
Regards,
Mall.
Hi and many thanks for the quick reply, i’ll give this a try now.
Thanks again
Tony
Hi Tony,
1 exception(s): Exception #0 (Magento\Framework\Exception\RuntimeException): Type Error occurred when creating object: Magento\Eav\Model\Entity\Attribute\Source\Config Exception #0 (Magento\Framework\Exception\RuntimeException): Type Error occurred when creating object: Magento\Eav\Model\Entity\Attribute\Source\Config #0
That issue related to at least one custom customer attribute which has the ‘select’ frontend_input type. But the needed source_model/backend_model was missing in your M2 instance.
You should debug further into the custom customer attributes at your end, then change the value of the ‘frontend_input’ field from ‘select’ to ‘text’. The issue should be resolved then.
Regards,
Mall.
Ok I’ve sorted that problem out and migration on our development servers has now completed, we’ll be running the same over our live systems around the 23rd of this month. Fingers crossed everything will now work perfectly once we start the live migration.
Many thanks for your assistance.
Tony
Hi Tony,
We’re glad to hear that. Please move forward with the migration process at your end. In case you have any additional question, feel free to get back to us here.
Regards,
Ubertheme team
OK just testing everything on our local development site since migration completed and just trying to remove any product from a category and i’m getting the following error…
[2019-09-18 20:40:57] main.CRITICAL: Could not save product “1864” with position 1 to category 4 {“exception”:”[object] (Magento\\Framework\\Exception\\CouldNotSaveException(code: 0): Could not save product \”1864\” with position 1 to category 4 at /var/www/vhosts/theappliancedepotm2.co.uk/htdocs/vendor/magento/module-catalog/Model/CategoryLinkRepository.php:90, Magento\\UrlRewrite\\Model\\Exception\\UrlAlreadyExistsException(code: 0): URL key for specified store already exists. at /var/www/vhosts/theappliancedepotm2.co.uk/htdocs/vendor/magento/module-url-rewrite/Model/Storage/DbStorage.php:247, Magento\\Framework\\Exception\\AlreadyExistsException(code: 0): URL key for specified store already exists. at /var/www/vhosts/theappliancedepotm2.co.uk/htdocs/vendor/magento/module-url-rewrite/Model/Storage/DbStorage.php:277, Magento\\Framework\\DB\\Adapter\\DuplicateException(code: 1062): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘smeg-pdx30c-1-modular-ultra-low-profile-ceramic-hob’ for key ‘URL_REWRITE_REQUEST_PATH_STORE_ID’, query was: INSERT INTO `url_rewrite` (`redirect_type`,`is_autogenerated`,`metadata`,`description`,`entity_type`,`entity_id`,`request_path`,`target_path`,`store_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?) at /var/www/vhosts/theappliancedepotm2.co.uk/htdocs/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:589, Zend_Db_Statement_Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘smeg-pdx30c-1-modular-ultra-low-profile-ceramic-hob’ for key ‘URL_REWRITE_REQUEST_PATH_STORE_ID’, query was: INSERT INTO `url_rewrite` (`redirect_type`,`is_autogenerated`,`metadata`,`description`,`entity_type`,`entity_id`,`request_path`,`target_path`,`store_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?) at /var/www/vhosts/theappliancedepotm2.co.uk/htdocs/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘smeg-pdx30c-1-modular-ultra-low-profile-ceramic-hob’ for key ‘URL_REWRITE_REQUEST_PATH_STORE_ID’ at /var/www/vhosts/theappliancedepotm2.co.uk/htdocs/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)”} []
Yours hopefully
Tony
Hi Tony,
It seems your database had some duplicated values of Url Key / Url Path of categories or products. Please try with steps below:
- Open SSH terminal, go to your M2 folder and run this command: php -f bin/ubdatamigration fixduplicateurl
- Once done, re-check the issue you mentioned.
If the issue still persists, you can try with additional steps below so that M2 can re-generate URL rewrite for your categories and associated products:
1 -- In categories management, create a new root category named ‘Temp Root Category’
2 -- Open Stores management, edit the default Store of the default Website and set the ‘Root Category’ form field to the newly added root category ‘Temp Root Category’ and click Save button.
3 -- Once done, open Stores management once again, edit the default Store of the default Website and set the Root Category form field to the main root category which you want to publish in the storefront again and click Save button.
Magento will regenerates categories and associate products URLs rewrite in this step. It might take sometime to complete this task (It depends on the volume of categories and associated products)
And then, re-index the data and clean the Magento cache. And tell me know how it goes.
Regards,
Mall.
Brilliant, also can i just say your support here is second to none!
Hi Tony,
We’re glad that it helps.
Please move forward with the process at your end. In case you need our technical assistance, please get back to us here.
PS. And once you complete the migration, we’re grateful if you can spare sometime to share with us your experience with the migration project via our UB Data Migration Pro’s review section here. This will be helpful for other reference when you start planning on their data migration project.
Sincerely,
Ubertheme team
Hi OK we’ve continued testing in our development Magento 2 and i’m trying to create a new order so we can see that passed to our stock management system… but when creating a new order it’s assigned order number 00000004 but in Magento 1 DB the last order id was 100016703, when looking in orders all the previous ones are there but the new test order does not show up. When checking the sequence_order_1 table in magento2’s database i can see the auto increment is set to 4 and there are only 3 records in there. So i’ve tried to reset the sales/orders step and re-migrate but the table is now empty?
Yours hopefully
Tony
Hi Tony,
… but when creating a new order it’s assigned order number 00000004 but in Magento 1 DB the last order id was 100016703,
Please note that Magento 2 applies a new rule to generate increment Ids of data objects (sales orders, payments, invoices…) which differs from M1’s rules.
You can learn more information about that in this post.
So i’ve tried to reset the sales/orders step and re-migrate but the table is now empty?
As explained above, the difference of the entity ids come from the working rule of M2 itself, so it’s not necessary to reset as you did.
Regards,
Ubertheme team
Ok we understand the change but when searching for the order-id on the order grid it does’t show up, since looking more i see it does show up on the admin dashboard under last 5 orders and i can click the order there and open it but still can’t see the order on the orders grid?
Tony
Hi Tony,
since looking more i see it does show up on the admin dashboard under last 5 orders and i can click the order there and open it but still can’t see the order on the orders grid?
Please try to reindex the data and then click ‘Reload data’ button in the backend dashboard of your site (Like this screenshot: http://prntscr.com/pdn6pr)
Then check the issue you mentioned again.
Regards,
Mall.
Hi Tony,
The issue you mentioned in your screenshots is strange. I need to take a closer look to debug the root cause of that issue.
Please provide me the information of your instance:
- URL and Admin credentials of your instance
- SSH credentials of your M2 instance
- Let me know the path to your M2 folder
I will help to check further and get back to you then.
PS. Please mark your reply private, or simply switch this ticket to private mode, then it’s safe to share your site info here. Only you and our technical can access.
Regards,
Mall.
Hi Tony,
The issue you mentioned in your reply #15 referred to the Magento 2 core functionality. We did ask for your site credentials to take a closer look to provide you with further info about that issue.
There’s a high chance that your M2 instance has unexpected issue itself, which does not relate to the migration. If possible, please consider to implement the migration once again on a fresh Magento 2 instance. We know this takes you extra time, yet it helps to avoid unexpected issue due to your first Magento instance.
Regards,
Ubertheme team
Hi thanks for the explanation if we come across this issue when we finally migrate to live then i’ll get back in-touch. Many thanks for all your assistance your support has been second to none!
Thanks again
Tony
Hi Tony,
We always to try our best to provide you help where possible. In case the issue still persists, then let us know here.
PS. Our apology for certain delay if you reach out to us during the weekend.
Regards,
Ubertheme team
Hi we’ve now completed the design side and integration with our warehouse management system and now doing some final tests in development which needed me to delta in all the recent changes but when getting to step 7 i’m now getting the following error…
Total Data Migrated: 71%
[Processing][run] in step #7: PHP Error[8]: unserialize(): Error at offset 0 of 351 bytes
in file /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/pub/ub-tool/protected/models/UBMigrate.php at line 346
#0 /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/pub/ub-tool/protected/models/UBMigrate.php(346): unserialize()
#1 /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/pub/ub-tool/protected/controllers/Step7Controller.php(143): UBMigrate->getSettingData()
#2 /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/pub/ub-tool/protected/commands/RunCommand.php(74): Step7Controller->actionRun()
#3 /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/pub/ub-tool/protected/commands/RunCommand.php(33): RunCommand->_migrateData()
#4 unknown(0): RunCommand->actionIndex()
#5 /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/pub/ub-tool/yii-1.1.19/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#6 /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/pub/ub-tool/yii-1.1.19/console/CConsoleCommandRunner.php(71): RunCommand->run()
#7 /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/pub/ub-tool/yii-1.1.19/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#8 /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/pub/ub-tool/yii-1.1.19/base/CApplication.php(185): CConsoleApplication->processRequest()
#9 /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/pub/ub-tool/yii-1.1.19/yiic.php(33): CConsoleApplication->run()
#10 /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#11 /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/bin/ubdatamigration(4): require_once()
-bash-4.1$
Yours hopefully
Tony Gillett
Hi Tony Gillett,
now completed the design side and integration with our warehouse management system and now doing some final tests in development which needed me to delta in all the recent changes but when getting to step 7 i’m now getting the following error…
Total Data Migrated: 71%
[Processing][run] in step #7: PHP Error[8]: unserialize(): Error at offset 0 of 351 bytes
in file /var/www/vhosts/theappliancedepotm3.co.uk/htdocs/pub/ub-tool/protected/models/UBMigrate.php at line 346
Please provide me the following information:
+ What is the version of your M2 instance?
+ What is the version of our module in your instance?
I will get back to you then.
Regards,
Mall.