Jump to content
  • 0

Migration Issue


pratkal
 Share

Question

Hello Blesta Team & Community,

 

We are having some issue migrating from WHMCS to Blesta. 

 

We are migrating from 7.5 to Blesta and using inbuild plugin import Manager 

 

We have successfully Imported Clients / Packages / Invoices / Modules but some part of migration is not completed

 

 

1- No Domains/hosting is migrated 

2- Module Solusvm Server is not migrated 

 

Please advice we are stuck on this process for nearly a day now

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
On 11/7/2021 at 3:06 PM, pratkal said:

Hello Blesta Team & Community,

 

We are having some issue migrating from WHMCS to Blesta. 

 

We are migrating from 7.5 to Blesta and using inbuild plugin import Manager 

 

We have successfully Imported Clients / Packages / Invoices / Modules but some part of migration is not completed

 

 

1- No Domains/hosting is migrated 

2- Module Solusvm Server is not migrated 

 

Please advice we are stuck on this process for nearly a day now

No answers since november 2021? It's April 2022 today.

I'm also stuck in a pre-flight test of WHMCS to Blesta. May issue is a duplicate entry for a primary key importing transactions. Anything below that fails because of the failed transaction above:

```

importInvoices
-----------------
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-519' for key 'PRIMARY'
importTransactions
-----------------
There is already an active transaction
importPackages
-----------------
There is already an active transaction
importPackageOptions
-----------------
importPackageOptions took: 0.1337 seconds
-----------------

....

Array
(
    [error] => Array
        (
            [0] => The import completed but the following errors ocurred:
            [1] => importInvoices: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-519' for key 'PRIMARY' on line 196
            [2] => importTransactions: There is already an active transaction on line 231
            [3] => importPackages: There is already an active transaction on line 231
            [4] => importServices: There is already an active transaction on line 231
            [5] => importSupportDepartments: There is already an active transaction on line 231
            [6] => importSupportTickets: There is already an active transaction on line 231
            [7] => importAffiliates: There is already an active transaction on line 231
            [8] => importMisc: There is already an active transaction on line 231
        )

)

```

Now I can't find this 1-519 key in my whmcs dump. Is there a better log/debug or shall I enable the mysql detailed log here?

Thanks.

Link to comment
Share on other sites

  • 0

It sounds like there might be an invoice with duplicate number or ID. Since it probably failed at that point, it would be useful to take a look in the invoices table to see what the most recent invoice imported was. Then compare to WHMCS and see which invoice is next. That one is likely the culprit.

Link to comment
Share on other sites

  • 0

  

Hi Paul, I'll try to reply, in hope of an anwer.

All invoices seem to have been imported, including their detail lines.

I traced the mysql statements issued by the migration tool. It tries to insert twice the same row in the "invoices_recur_created" table (here is invoice id 521 while in the previous example it was 519).

637226 Query    INSERT INTO `invoices_recur_created` (`invoice_recur_id`, `invoice_id`) VALUES ('1', '521')
637226 Query    INSERT INTO `invoices_recur_created` (`invoice_recur_id`, `invoice_id`) VALUES ('1', '521')

Here the invoices_recurcreated table has an unique primary index over "invoice_recur_id+invoice_id".

Investigating further, it looks like the issue happens on a customer with "billable items" that were invoiced on multiple invoices, please see the attached image That is, WHMCS allows you to create a generic billable item and to specify that it has to be billed multiple times. So WHMCS will bill the item on multiple invoices at the predefined schedule. Then you can see on which invoices it was billed. So you have a back-reference or link from the invoices to the billable item. My guess is that the import module is trying to create this recurring billable item multiple times.

Perhaps it's enough to "ignore" the error or to check if the recurring item is already present and act accordingly.

Let me know, as this is blocking for me. I'd like to proceed with a paid license.

Thanks.306313420_whmcsmultiplebillableitem.thumb.png.3ef4a0814ddcc8ba5b17fe5c52554de1.png

Link to comment
Share on other sites

  • 0
On 5/11/2022 at 6:18 AM, Himax said:

  

Hi Paul, I'll try to reply, in hope of an anwer.

All invoices seem to have been imported, including their detail lines.

I traced the mysql statements issued by the migration tool. It tries to insert twice the same row in the "invoices_recur_created" table (here is invoice id 521 while in the previous example it was 519).

637226 Query    INSERT INTO `invoices_recur_created` (`invoice_recur_id`, `invoice_id`) VALUES ('1', '521')
637226 Query    INSERT INTO `invoices_recur_created` (`invoice_recur_id`, `invoice_id`) VALUES ('1', '521')

Here the invoices_recurcreated table has an unique primary index over "invoice_recur_id+invoice_id".

Investigating further, it looks like the issue happens on a customer with "billable items" that were invoiced on multiple invoices, please see the attached image That is, WHMCS allows you to create a generic billable item and to specify that it has to be billed multiple times. So WHMCS will bill the item on multiple invoices at the predefined schedule. Then you can see on which invoices it was billed. So you have a back-reference or link from the invoices to the billable item. My guess is that the import module is trying to create this recurring billable item multiple times.

Perhaps it's enough to "ignore" the error or to check if the recurring item is already present and act accordingly.

Let me know, as this is blocking for me. I'd like to proceed with a paid license.

Thanks.306313420_whmcsmultiplebillableitem.thumb.png.3ef4a0814ddcc8ba5b17fe5c52554de1.png

Thanks for the update. Tagging @Jono so he can take a look.

If you are willing to provide basic steps on how to create a billable item to generate multiple invoices in WHMCS as you indicated, we can try to reproduce for a test import.

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

×
×
  • Create New...