Invalid argument supplied for foreach()

I’m receiving an error when I run the Step 7 after we upgraded to UB Migration Pro 3.2.2.

 Invalid argument supplied for foreach()
in file /home/dev/public_html/pub/ub-tool/protected/controllers/Step7Controller.php at line 1782
#0 /home/dev/public_html/pub/ub-tool/protected/controllers/Step7Controller.php(1587): Step7Controller->_migrateSalesQuoteItem()
#1 /home/dev/public_html/pub/ub-tool/protected/controllers/Step7Controller.php(1444): Step7Controller->_migrateSalesQuote()
#2 /home/dev/public_html/pub/ub-tool/protected/controllers/Step7Controller.php(253): Step7Controller->_migrateSalesOrders()
#3 /home/dev/public_html/pub/ub-tool/protected/commands/RunCommand.php(74): Step7Controller->actionRun()
#4 /home/dev/public_html/pub/ub-tool/protected/commands/RunCommand.php(33): RunCommand->_migrateData()
#5 unknown(0): RunCommand->actionIndex()
#6 /home/dev/public_html/pub/ub-tool/yii-1.1.19/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#7 /home/dev/public_html/pub/ub-tool/yii-1.1.19/console/CConsoleCommandRunner.php(71): RunCommand->run()
#8 /home/dev/public_html/pub/ub-tool/yii-1.1.19/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#9 /home/dev/public_html/pub/ub-tool/yii-1.1.19/base/CApplication.php(185): CConsoleApplication->processRequest()
#10 /home/dev/public_html/pub/ub-tool/yii-1.1.19/yiic.php(33): CConsoleApplication->run()
#11 /home/dev/public_html/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#12 /home/dev/public_html/bin/ubdatamigration(4): require_once()
[dev@host public_html]$

9 answers

Profile photo of Mall Staff 184060.00 $tone October 18, 2019
Public

Hi there,

Invalid argument supplied for foreach() in file /home/dev/public_html/pub/ub-tool/protected/controllers/Step7Controller.php at line 1782

That is strange. Please provide me information of your instance:

  • Admin credentials of your M2 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 make sure you 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 team can access.
Regards,
Mall.

#1
Profile photo of ubdev Staff 98350.00 $tone October 24, 2019
Public

Hi there, 
We’ve checked again however the credentials you provided were no longer available: 

https://privnote.com/thCtpGIn#BRWxydRGw

Please provide us those credentials again. Once you mark your reply ‘private’ or simply switch this ticket to the private mode, then it’s safe to share your site info here. Only you and our technical team can access. 
Regards,
Ubertheme team

#7
Profile photo of Mall Staff 184060.00 $tone October 25, 2019
Public

Hi there,

Invalid argument supplied for foreach()
in file /home/dev/public_html/pub/ub-tool/protected/controllers/Step7Controller.php at line 1782

To solve that issue, please try with the steps as follows:

+ Run the following SQL in your M2 database:

DELETE FROM ub_migrate_map_step_7 WHERE entity_name = 'salesrule' AND m2_id NOT IN (Select rule_id From salesrule);
DELETE FROM ub_migrate_map_step_7 WHERE entity_name = 'salesrule_coupon' AND m2_id NOT IN (Select coupon_id From salesrule_coupon);

DELETE FROM ub_migrate_map_step_7_order_item WHERE entity_name = 'sales_flat_order_item' AND m2_id NOT IN (Select item_id From sales_order_item);

DELETE FROM ub_migrate_map_step_7_order_address WHERE entity_name = 'sales_flat_order_address' AND m2_id NOT IN (Select entity_id From sales_order_address);

DELETE FROM ub_migrate_map_step_7_quote WHERE entity_name = 'sales_flat_quote' AND m2_id NOT IN (Select entity_id From quote);
DELETE FROM ub_migrate_map_step_7_quote_item WHERE entity_name = 'sales_flat_quote_item' AND m2_id NOT IN (Select item_id From quote_item);
DELETE FROM ub_migrate_map_step_7_quote_address WHERE entity_name = 'sales_flat_quote_address' AND m2_id NOT IN (Select address_id From quote_address);

+ Once done, continue with the data migration in step #7:
php -f bin/ubdatamigration run --step=7

Regards,
Mall.
 

#9

Please login or Register to Submit Answer

Written By

Comments