Step 8 : Creating default object from empty..

Hi
We are seeing the error on step 8:
Processing in step #8…PHP Error[2]: Creating default object from empty value
in file /var/www/vhosts/example.com/htdocs/pub/ub-tool/protected/controllers/Step8Controller.php at line 1385
#0 /var/www/vhosts/example.com/htdocs/pub/ub-tool/protected/controllers/Step8Controller.php(369): Step8Controller->_migrateTaxCalculationRule()
#1 /var/www/vhosts/example.com/htdocs/pub/ub-tool/protected/commands/RunCommand.php(58): Step8Controller->actionRun()
#2 /var/www/vhosts/example.com/htdocs/pub/ub-tool/protected/commands/RunCommand.php(28): RunCommand->_migrateData()
#3 unknown(0): RunCommand->actionIndex()
#4 /var/www/vhosts/example.com/htdocs/pub/ub-tool/yii-1.1.19/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#5 /var/www/vhosts/example.com/htdocs/pub/ub-tool/yii-1.1.19/console/CConsoleCommandRunner.php(71): RunCommand->run()
#6 /var/www/vhosts/example.com/htdocs/pub/ub-tool/yii-1.1.19/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#7 /var/www/vhosts/example.com/htdocs/pub/ub-tool/yii-1.1.19/base/CApplication.php(185): CConsoleApplication->processRequest()
#8 /var/www/vhosts/example.com/htdocs/pub/ub-tool/yii-1.1.19/yiic.php(33): CConsoleApplication->run()
#9 /var/www/vhosts/example.com/htdocs/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#10 /var/www/vhosts/example.com/htdocs/bin/ubdatamigration(4): require_once()
Any ideas?
Thanks

7 answers

Profile photo of Mall Staff 184060.00 $tone February 5, 2020
Public

Hi there,

Processing in step #8…PHP Error[2]: Creating default object from empty value
in file /var/www/vhosts/example.com/htdocs/pub/ub-tool/protected/controllers/Step8Controller.php at line 1385

Lets try fix that issue by following steps:
+ Run CLI command:
php -f bin/ubdatamigration clean --step=8
+ And then, continue with data migration in step #8.
php -f bin/ubdatamigration run --step=8
Regards,
Mall.

#1
Profile photo of fastco 20.00 $tone February 5, 2020
Public

Thank you.
Running php -f bin/ubdatamigration clean --step=8 results in:
Yii command runner (based on Yii v1.1.19)
Usage: bin/ubdatamigration <command-name> [parameters…]
The following commands are available:
-- cleanduplicateurl
-- fixduplicateurl
-- message
-- migrate
-- reset
-- run
-- shell
-- webapp
To see individual command help, use the following:
bin/ubdatamigration help <command-name>
 
?
thanks

#2
Profile photo of Mall Staff 184060.00 $tone February 5, 2020
Public

Hi there,

Running php -f bin/ubdatamigration clean --step=8 results in:
Yii command runner (based on Yii v1.1.19)

So, please try with steps:
+ Run following SQLs in your M2 database:

DELETE FROM ub_migrate_map_step_8_review WHERE entity_name = 'review' AND m2_id NOT IN (Select review_id From review);
DELETE FROM ub_migrate_map_step_8_subscriber WHERE entity_name = 'newsletter_subscriber' AND m2_id NOT IN (Select subscriber_id From newsletter_subscriber);
DELETE FROM ub_migrate_map_step_8 WHERE entity_name = 'tax_class' AND m2_id NOT IN (SELECT class_id FROM tax_class);

Clean the cache of our migration tool by run command: 
rm -rf pub/ub-tool/protected/runtime/cache/
If you have enabled PHP memcache, you need to refresh cache engine in your server too.
+ Once done, you continue with data migration in step #8:
php -f bin/ubdatamigration run --step=8
Regards,
Mall.

#3
Profile photo of Mall Staff 184060.00 $tone February 5, 2020
Public

Hi there,

I followed these steps but still get the same error.

So, lets provide me information about your instance:
+ Admin credentials of your M2
+ SSH credentials and let’s me know path to M2 folder.
I will help to check further and get back you then.
Regards,
Mall.

#5
Profile photo of Mall Staff 184060.00 $tone February 6, 2020
Public

Hi there,

I’ve checked your instance and saw the issue you mentioned: http://prntscr.com/qy7wdl
 
That issue occurred because you did delete at least one migrated tax calculation rule in M2 after first migration. 

To handle for that case, you can do steps as follows:

+ Run this SQL query in your M2 database:

DELETE FROM ub_migrate_map_step_8 WHERE entity_name = 'tax_calculation_rule' AND m2_id NOT IN (SELECT tax_calculation_rule_id FROM tax_calculation_rule);

+ Clean the cache of our migration tool by running the command: 
rm -rf pub/ub-tool/protected/runtime/cache/

+ Once done, you continue with the data migration in step #8:
php -f bin/ubdatamigration run --step=8
 
PS. I saw the current version of your M2 is ver.2.3.3 but the version of our module is ver.3.1.8. You should consider to upgrade to latest version of our module ver.3.2.3.

Regards,
Mall.

#7

Please login or Register to Submit Answer

Written By

Comments