Jump to content

Whmcs Migrator (Beta) - Updated 2013-11-12


Cody

Recommended Posts

Yay! I forced it to generate an error. :)

 

 

Parse error: syntax error, unexpected '", false)->' (T_CONSTANT_ENCAPSED_STRING) in /home/user/public_html/blesta/app/models/packages.php on line 393

Looks like the incremental update I downloaded was corrupt. I redownloaded it and it fixed it. :) This whole time I was looking at the plugin but it was the core files that were bad.

Link to comment
Share on other sites

Well, now that I'm actually able to get into the system (turns out suhosin doesn't like blesta, or the other way around):

 

 

The import completed but the following errors ocurred:
importClients: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'country' cannot be null on line 124
importContacts: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importCurrencies: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importInvoices: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importPackages: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importSupportDepartments: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importSupportTickets: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importMisc: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124

 

Import did not actually complete, added about 9 clients, nothing else.

 

There needs to be a default set for every option, to prevent problems like this. obviously, this one was easily solved, but now I have to basically reset data, and try again.

Link to comment
Share on other sites

Well, now that I'm actually able to get into the system (turns out suhosin doesn't like blesta, or the other way around):

 

 

The import completed but the following errors ocurred:
importClients: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'country' cannot be null on line 124
importContacts: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importCurrencies: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importInvoices: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importPackages: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importSupportDepartments: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importSupportTickets: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importMisc: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124

 

Import did not actually complete, added about 9 clients, nothing else.

 

There needs to be a default set for every option, to prevent problems like this. obviously, this one was easily solved, but now I have to basically reset data, and try again.

 

Welcome to the wonderful world of the Beta importer.  I'm stuck waiting for a fix to my issues, nobody has even addressed my post on a previous page...

Link to comment
Share on other sites

yay, clients got imported. Now, on to services and invoices, but oops?

 

The import completed but the following errors ocurred:

importClients: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-40' for key 'PRIMARY' on line 124

importContacts: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124

importCurrencies: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124

importInvoices: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124

importPackages: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124

importSupportDepartments: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124

importSupportTickets: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124

importMisc: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124

 

We need a bit more info passed on so we can actually resolve errors like this. What table, what query was run? I have no clue where this 'duplicate entry' is from, though I could probably solve it if more info was passed to the client.

Once again, not a complete import, a partial one. Need to do something about changing the ID's if they already exist and re-associating them properly

Link to comment
Share on other sites

About the tickets not coming over?

 

That is part of it.  The other issue was the way products were being pulled over, the 8 or 10 different products for each TLD.

I also had issues with the import on modules:

http://www.blesta.com/forums/index.php?/topic/960-whmcs-migrator-beta-updated-2013-10-25/page-5#entry10409

I also had the pricing issues.

 

I wasn't aware of any new releases from Cody that addressed my issues specifically.

Link to comment
Share on other sites

I'm seeing html entities in pretty much everything moved over. Example: One of our invoice lines contained "-->" which was transformed into "-->" on migrating. 

 

Also, after migrating, the number of accounts on our servers was "0". But by editing and saving each server in the module setup area, it seems to have recounted.

 

You've got to be kidding... WHMCS stores HTML entities in the database?! :o

 

I wonder how many fields are encoded?

 

  • Invoice Lines
  • Company Name
  • ???

Maybe we'll just need to decode everything.

Link to comment
Share on other sites

Managed to fix the duplicate entry/contacts thing, still nothing on the 'number out of bounds' issues earlier. I'm assuming that means that the importer is missing fields, either not enough, or too many to deal with the db

 

Any error that states "Invalid parameter number: number of bound variables..." is simply caused by the previous error. In your case:

 

importClients: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-40' for key 'PRIMARY' on line 124

 

That sounds like you tried to import into an already populated database, where a client could not be imported due to it already existing.

Link to comment
Share on other sites

Any error that states "Invalid parameter number: number of bound variables..." is simply caused by the previous error. In your case:

 

 

 

That sounds like you tried to import into an already populated database, where a client could not be imported due to it already existing.

Yeah, not so much. 

It doesn't even try to import data that's already in there, which is a good thing, otherwise I'd have to simply wipe and reinstall every single time I ran this mess of an importer.

There's something else going on here, and it doesn't have anything to do with previously imported data, because it CAN move past this.

 

The first time I ran this, it imported 9 clients. Found and fixed the errors being mentioned (again, you need to set default values for imported data, just in case they don't exist)

Second time I ran it, all clients were imported, but there were a couple contact issues which caused it to bail. Also managed to import all payments made

Now, it's just refusing to do anything else.

 

I shouldn't have to wipe the entire database and reinstall every time I run an importer here. That's way too much work for a system that's flawed to begin with

Link to comment
Share on other sites

Yeah, not so much. 

It doesn't even try to import data that's already in there, which is a good thing, otherwise I'd have to simply wipe and reinstall every single time I ran this mess of an importer.

There's something else going on here, and it doesn't have anything to do with previously imported data, because it CAN move past this.

 

The first time I ran this, it imported 9 clients. Found and fixed the errors being mentioned (again, you need to set default values for imported data, just in case they don't exist)

Second time I ran it, all clients were imported, but there were a couple contact issues which caused it to bail. Also managed to import all payments made

Now, it's just refusing to do anything else.

 

I shouldn't have to wipe the entire database and reinstall every time I run an importer here. That's way too much work for a system that's flawed to begin with

 

The importer is designed to be run only on a fresh (not previously imported) database. As per the instructions when running the importer, back up your Blesta database first, then import. If you run into errors, restore your database before attempting to run the importer again. There's no need to reinstall, just restore your database.

 

Why are you required to import into a fresh database each time? Because the migrator must map data from WHMCS into Blesta which it does by storing references in memory. If you run the importer more than once then the references created during the first import are not available upon the second run, making it impossible to reconcile that data.

Link to comment
Share on other sites

Ok, here we go. Clean import, from the ground up (using b5). Guess what? We're back to all errors , once again

 

The import completed but the following errors ocurred:
importClients: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-40' for key 'PRIMARY' on line 124
importCurrencies: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importInvoices: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importPackages: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importSupportDepartments: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importSupportTickets: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124
importMisc: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 124

As far as needing a fresh install every time? Not so much. A simple php / sql query could figure out if X is in the database or not, and if not, insert it. If so, move on.

Link to comment
Share on other sites

Admin passwords in WHMCS are interestingly slightly less secure than their client passwords. They are MD5, and can be supported by enabling legacy password support in config/blesta.php. Client passwords on the other hand are salted, and Cody says they can be supported if we make a core change to Blesta to support both legacy MD5 and the ones WHMCS uses. We haven't decided if this is something we want to do yet.

Link to comment
Share on other sites

Admin passwords in WHMCS are interestingly slightly less secure than their client passwords. They are MD5, and can be supported by enabling legacy password support in config/blesta.php. Client passwords on the other hand are salted, and Cody says they can be supported if we make a core change to Blesta to support both legacy MD5 and the ones WHMCS uses. We haven't decided if this is something we want to do yet.

 

Would it be possible mate, to pick the salt up and try to de-salt it using the method whmcs used and then rehash them into Blesta's?

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
Reply to this topic...

×   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...