KuJoe Posted October 26, 2013 Report Posted October 26, 2013 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. Quote
Michael Posted October 26, 2013 Report Posted October 26, 2013 Woops nice find glad you solved it. Quote
twhiting9275 Posted October 28, 2013 Report Posted October 28, 2013 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. Quote
tsiedsma Posted October 28, 2013 Report Posted October 28, 2013 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... Quote
twhiting9275 Posted October 28, 2013 Report Posted October 28, 2013 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 Quote
twhiting9275 Posted October 28, 2013 Report Posted October 28, 2013 "&" symbol in company name in WHMCS translates to "&" in Blesta. This is actually how it should have been all along. You should be using htmlentities instead of passing & to the browser Quote
John Posted October 28, 2013 Report Posted October 28, 2013 Just migrated from HB -> WHMCS -> Blesta Not too bad. Michael 1 Quote
Michael Posted October 28, 2013 Report Posted October 28, 2013 Just migrated from HB -> WHMCS -> Blesta Not too bad. Your as bad as me LOL, from WH** -> Blesta 2.5 -> Blesta 3.0 B7 haha. Glad you had a save journey through them. John 1 Quote
FRH Dave Posted October 28, 2013 Report Posted October 28, 2013 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... About the tickets not coming over? Quote
tsiedsma Posted October 28, 2013 Report Posted October 28, 2013 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. Quote
KuJoe Posted October 28, 2013 Report Posted October 28, 2013 Import went smoothly here. Michael 1 Quote
twhiting9275 Posted October 28, 2013 Report Posted October 28, 2013 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 Quote
Cody Posted October 28, 2013 Author Report Posted October 28, 2013 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?! I wonder how many fields are encoded? Invoice Lines Company Name ??? Maybe we'll just need to decode everything. Michael 1 Quote
TechDaddies-Kevin Posted October 28, 2013 Report Posted October 28, 2013 I think that would be the safest bet, to be honest. I've noticed issues in our imported support tickets, as well. John 1 Quote
Cody Posted October 28, 2013 Author Report Posted October 28, 2013 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. Michael 1 Quote
twhiting9275 Posted October 28, 2013 Report Posted October 28, 2013 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 Quote
Cody Posted October 28, 2013 Author Report Posted October 28, 2013 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. Michael 1 Quote
Cody Posted October 28, 2013 Author Report Posted October 28, 2013 Latest version of the migrator is up (b5). You can get it here, direct download here. Changes include: Sets country to US if not set (clients, contacts, payment accounts). Sets first/last name for payment accounts to unknown if not set. Decodes HTML entities. Imports invoice credits as in house credits. Michael and FRH Dave 2 Quote
twhiting9275 Posted October 28, 2013 Report Posted October 28, 2013 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. Quote
DandyDandy Posted October 28, 2013 Report Posted October 28, 2013 Is there any plans to see about being able to client login passwords across when importing from WHMCS? Quote
twhiting9275 Posted October 28, 2013 Report Posted October 28, 2013 Is there any plans to see about being able to client login passwords across when importing from WHMCS? Given that these are (hopefully) md5, I'm betting this isn't going to be too possible. Maybe a mass email after import would be in order Quote
Paul Posted October 28, 2013 Report Posted October 28, 2013 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. Michael 1 Quote
tsiedsma Posted October 28, 2013 Report Posted October 28, 2013 * DING DING * Round 5? Starting the import again with 3.0.5 and Migrator b5. Quote
Michael Posted October 28, 2013 Report Posted October 28, 2013 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? Quote
TechDaddies-Kevin Posted October 28, 2013 Report Posted October 28, 2013 No. MD5 is strictly one-way. I think the best route is to simply reset all passwords on migration and send a mass email to your client base advising them of the change. FRH Dave and twhiting9275 2 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.