Jump to content
  • 0

Migrating From 2.5


pmcwebs

Question

Hey all

 

I've stuck with 2.5 for a while but now that we've hit 3.1 I'm trying to move across.  I've tried migrating using the plugin but I get the following error:

 

SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

 

After that, the system will show most of my clients, but not all.  It doesn't show any services.  I've done a search but can't find any similar topics.

 

Any ideas?

 

Pete

 

 

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

Hey all

 

I've stuck with 2.5 for a while but now that we've hit 3.1 I'm trying to move across.  I've tried migrating using the plugin but I get the following error:

 

SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

 

After that, the system will show most of my clients, but not all.  It doesn't show any services.  I've done a search but can't find any similar topics.

 

Any ideas?

 

Pete

Do any of the clients have custom fields set?  Though, realistically I don't see how that matters any in this situation, it could.

 

Basically what's happening is when you're running the import plugin to migrate, there's one too many fields (either column names or data) and its throwing off the import.

 

There's nothing I personally know how to fix this, but I'm sure Paul, Cody or Tyson will have an idea or two.

Link to comment
Share on other sites

  • 0

Hi Cody

 

This is what I get:

 

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'country' cannot be null#0 /home/pmcwebs/public_html/blesta/lib/model.php(124): PDOStatement->execute(Array) #1 /home/pmcwebs/public_html/blesta/components/record/record.php(216): Model->query('INSERT INTO `co...', Array) #2 /home/pmcwebs/public_html/blesta/plugins/import_manager/components/migrators/blesta/2.5/blesta2_5.php(354): Record->insert('contacts', Array) #3 /home/pmcwebs/public_html/blesta/plugins/import_manager/components/migrators/blesta/2.5/blesta2_5.php(196): Blesta2_5->importClients() #4 /home/pmcwebs/public_html/blesta/plugins/import_manager/models/import_manager_importer.php(113): Blesta2_5->import() #5 /home/pmcwebs/public_html/blesta/plugins/import_manager/controllers/admin_manage_plugin.php(110): ImportManagerImporter->runMigrator('blesta', '2.5', Array) #6 /home/pmcwebs/public_html/blesta/app/controllers/admin_company_plugins.php(104): AdminManagePlugin->import() #7 /home/pmcwebs/public_html/blesta/lib/dispatcher.php(111): AdminCompanyPlugins->manage() #8 /home/pmcwebs/public_html/blesta/index.php(21): Dispatcher::dispatch('/blesta/admin/s...') #9 {main}

Link to comment
Share on other sites

  • 0

Hi Cody

 

I ran the sql commands and all clients have a country.  

 

Error message is:

 

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'country' cannot be null#0 /home/pmcwebs/public_html/blesta/lib/model.php(124): PDOStatement->execute(Array) #1 /home/pmcwebs/public_html/blesta/components/record/record.php(216): Model->query('INSERT INTO `co...', Array) #2 /home/pmcwebs/public_html/blesta/plugins/import_manager/components/migrators/blesta/2.5/blesta2_5.php(354): Record->insert('contacts', Array) #3 /home/pmcwebs/public_html/blesta/plugins/import_manager/components/migrators/blesta/2.5/blesta2_5.php(196): Blesta2_5->importClients() #4 /home/pmcwebs/public_html/blesta/plugins/import_manager/models/import_manager_importer.php(113): Blesta2_5->import() #5 /home/pmcwebs/public_html/blesta/plugins/import_manager/controllers/admin_manage_plugin.php(110): ImportManagerImporter->runMigrator('blesta', '2.5', Array) #6 /home/pmcwebs/public_html/blesta/app/controllers/admin_company_plugins.php(104): AdminManagePlugin->import() #7 /home/pmcwebs/public_html/blesta/lib/dispatcher.php(111): AdminCompanyPlugins->manage() #8 /home/pmcwebs/public_html/blesta/index.php(21): Dispatcher::dispatch('/blesta/admin/s...') #9 {main}

 

Short of recreating 2.5 from scratch, is there somewhere I can get a stock 2.5 sql dump so I can compare?

 

Pete

Link to comment
Share on other sites

  • 0

You still have clients or contacts with non-existent countries. It's possible even invalid countries. If you can't figure out which clients or contacts the problem is occurring for, just update /plugins/import_manager/components/migrators/blesta/2.5/blesta2_5.php from:

				'country' => $client->c_2char != "" ? $client->c_2char : null,

To:

				'country' => $client->c_2char != "" ? $client->c_2char : "US",
Link to comment
Share on other sites

  • 0

Hi Cody

 

Thanks for your help.  I've now got to here:

 

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'term' in 'field list'#0 /home/pmcwebs/public_html/blesta/lib/model.php(124): PDOStatement->execute(Array) #1 /home/pmcwebs/public_html/blesta/components/record/record.php(216): Model->query('INSERT INTO `pa...', Array) #2 /home/pmcwebs/public_html/blesta/plugins/import_manager/components/migrators/blesta/2.5/blesta2_5.php(1163): Record->insert('package_pricing', Array) #3 /home/pmcwebs/public_html/blesta/plugins/import_manager/components/migrators/blesta/2.5/blesta2_5.php(196): Blesta2_5->importServices() #4 /home/pmcwebs/public_html/blesta/plugins/import_manager/models/import_manager_importer.php(113): Blesta2_5->import() #5 /home/pmcwebs/public_html/blesta/plugins/import_manager/controllers/admin_manage_plugin.php(110): ImportManagerImporter->runMigrator('blesta', '2.5', Array) #6 /home/pmcwebs/public_html/blesta/app/controllers/admin_company_plugins.php(104): AdminManagePlugin->import() #7 /home/pmcwebs/public_html/blesta/lib/dispatcher.php(111): AdminCompanyPlugins->manage() #8 /home/pmcwebs/public_html/blesta/index.php(21): Dispatcher::dispatch('/blesta/admin/s...') #9 {main}

Link to comment
Share on other sites

  • 0

Hi Cody, and thanks for assisting me here...

 

The new migrator zip file worked ok I 'think'.....it went all the way through but at the end came up with an error:  Please select the country that matches the selected state.

 

I've looked at the data and it appears all there....if I have any more issues I'll let you know.  Thanks again for the help.

 

Pete

Link to comment
Share on other sites

  • 0

That error may mean that one or more contacts failed to import because there was a state value for which the given country value did not exist. For example, if you have a contact with a state of "CA" and a country of "AUS" you would receive that error because "CA" is not a valid state/province for Australia.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...