Jump to content
  • 0

Blesta Deletes All Plesk Websites When A Customer Cancels Just One!


1983ltd

Question

19 answers to this question

Recommended Posts

  • 0

If any customer cancels a single domain hosting package from within blest, it deletes ALL customers and ALL domains from the entire plesk server!

 

WTF...

 

This is now the 8 or 9th major... and i mean MAJOR bug with blesta.

 

Will I ever have a product that actually works?!?! loosing the will to live with all this!

 

Can someone explain why I just lost ALL sites and customers including all the data from Plesk?

 

For you Paul / Tyson...

 

Plesk for windows v11.5.30

Blesta v3.0.3

Link to comment
Share on other sites

  • 0

What's in the Module Log related to that transaction with Plesk?

 

The following.... Looks like its just trying to remove one domain and one client...

However, the below action instantly removed ALL customers and ALL domains....

 

 

 

INPUT

 

 

37.128.131.55|webspace:del
a:1:{s:5:"names";a:1:{i:0;s:16:"somthing.com";}}
 
OUTPUT
 
37.128.131.55
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.5.0">
  <webspace>
    <del>
      <result>
        <status>ok</status>
        <filter-id>gerw5gw43g54.com</filter-id>
        <id>14</id>
      </result>
    </del>
  </webspace>
</packet>
 
INPUT
37.128.131.55|customer:del
a:1:{s:6:"filter";a:1:{s:5:"login";s:9:"gerw5gw42";}}
 
OUTPUT
37.128.131.55
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.5.0">
  <customer>
    <del>
      <result>
        <status>ok</status>
        <filter-id>13</filter-id>
        <id>13</id>
      </result>
      <result>
        <status>ok</status>
        <filter-id>14</filter-id>
        <id>14</id>
      </result>
    </del>
  </customer>
</packet>
Link to comment
Share on other sites

  • 0

Walking through this real quick... from your log, I can see the input specifies a single subscription to delete, and Blesta received a response from Plesk indicating that only that subscription was deleted, so that looks okay.

 

Then the customer was deleted, as identified by that login name. The response indicates 2 customer accounts were deleted. Was that login linked to 2 customer accounts? If so, then that looks correct too.

 

Looking at the Plesk API, there is a way to delete *all* subscriptions via the API, if you do not specify a filter. While possible, your logs show that's not what happened. The Plesk API for deleting customers doesn't specify whether or not all customers can be deleted by not specifying a filter, but presuming it does, your logs don't seem to indicate that's what happened either.

 

If a customer is deleted in Plesk, do domains/subscriptions associated with that customer automatically get deleted as well? Plesk might have certain dependencies like that, which we're not aware of, that could be the cause of everything being deleted. Based on that and the response from Plesk in your logs, the only data that should have been deleted are the customer and subscription.

 

You may want to contact Plesk support and ask them how everything could be deleted via the API, especially considering Plesk's API response indicates it deleted only 1 subscription and 2 customer accounts.

Link to comment
Share on other sites

  • 0

Walking through this real quick... from your log, I can see the input specifies a single subscription to delete, and Blesta received a response from Plesk indicating that only that subscription was deleted, so that looks okay.

 

Then the customer was deleted, as identified by that login name. The response indicates 2 customer accounts were deleted. Was that login linked to 2 customer accounts? If so, then that looks correct too.

 

Looking at the Plesk API, there is a way to delete *all* subscriptions via the API, if you do not specify a filter. While possible, your logs show that's not what happened. The Plesk API for deleting customers doesn't specify whether or not all customers can be deleted by not specifying a filter, but presuming it does, your logs don't seem to indicate that's what happened either.

 

If a customer is deleted in Plesk, do domains/subscriptions associated with that customer automatically get deleted as well? Plesk might have certain dependencies like that, which we're not aware of, that could be the cause of everything being deleted. Based on that and the response from Plesk in your logs, the only data that should have been deleted are the customer and subscription.

 

You may want to contact Plesk support and ask them how everything could be deleted via the API, especially considering Plesk's API response indicates it deleted only 1 subscription and 2 customer accounts.

That one was a test...

 

I created two different users / domains in different Blesta accounts....

 

I logged in as a single user that had a single domain/subscription...

 

It then deletes both my test customers and both the test domains / websites...

 

So you right, it did delete both... but it should have only deleted one!!

 

If I set up hundreds of different users with different domains, any one single user cancelling their subscription via their blesta account would delete everyone else's domains and accounts on that server...

 

So you can see the error in the logs which is good.

 

Not sure how helpful asking plesk would be????????

 

Did you replicate this on your test rig?

Link to comment
Share on other sites

  • 0

Just to confirm, the answer to your question below is NO, two different customers....

 

 

"Then the customer was deleted, as identified by that login name. The response indicates 2 customer accounts were deleted. Was that login linked to 2 customer accounts? If so, then that looks correct too."

Link to comment
Share on other sites

  • 0

I found the issue. The API from the Plesk module was not properly setting the customer login name as you mentioned, which Plesk interprets as "delete all customers". And when Plesk deletes a customer, it also automatically deletes subscriptions assigned to those customers, so inevitably everything was deleted.


Attached is the fix for this problem. You can replace /components/modules/plesk/apis/commands/plesk_customer_accounts.php in your Blesta installation with the one attached.

plesk_customer_accounts.php

Link to comment
Share on other sites

  • 0

There are soooo many bugs!

 

I think this time it stemed from changing the renewal date in blesta....

 

That in turn for some reason removed the label for the site???

 

------

 

PS

 

------

 

So just to confirm the new issue. If you change the renewal date and submit the change using the module, the website title is lost 'domain.com' so it just apears blank, if you then delete that package in order to sync them back up again it submits to domain and of course deletes ALL data in plesk again... Grrrrrrrr

Link to comment
Share on other sites

  • 0

This fix will also be in v3.0.4. In addition, the Plesk module will now refuse to attempt to delete any subscription, customer, or reseller if filter options are missing, so as to avoid Plesk's interpretation of "delete everything".

 

I think what Tyson did here he did after posting the hotfix above. If I'm right, the issue you experienced with changing the renewal date is already corrected it's just not in the file you downloaded. Tyson, can you confirm? I can post a new file for testing if that's the case.

Link to comment
Share on other sites

  • 0

This sounds like a separate issue. If you change the renew date, the domain name becomes blank in Plesk (and/or in Blesta)? What's in the Module Log regarding this?

 

The fix I included in the file above specifies a filter for a customer if one is available, so you shouldn't experience a "delete all" issue again. The additional check I mentioned to refuse attempts to delete something without a filter set is indeed in a different file (the main plugin file), which Paul can attach to this thread.

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