1983ltd Posted October 4, 2013 Report Posted October 4, 2013 If any customer cancels a single domain hosting package from within blest, it deletes ALL customers and ALL domains from the entire plesk server! Can someone explain why I just lost ALL sites and customers including all the data from Plesk? Quote
0 Paul Posted October 4, 2013 Report Posted October 4, 2013 Can you let us know the Plesk version? Tyson is investigating this right now. Quote
0 1983ltd Posted October 4, 2013 Author Report Posted October 4, 2013 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 Quote
0 Tyson Posted October 4, 2013 Report Posted October 4, 2013 What's in the Module Log related to that transaction with Plesk? Quote
0 1983ltd Posted October 4, 2013 Author Report Posted October 4, 2013 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> Quote
0 1983ltd Posted October 4, 2013 Author Report Posted October 4, 2013 PS.. Tested repeatedly, and every time the logs look innocent... however removes EVERYTHING every time repeatedly... If anyone needs access to our plesk server your welcome to the details to test (not like there is anything left on there now). Quote
0 Tyson Posted October 4, 2013 Report Posted October 4, 2013 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. Quote
0 1983ltd Posted October 4, 2013 Author Report Posted October 4, 2013 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? Quote
0 1983ltd Posted October 4, 2013 Author Report Posted October 4, 2013 If not specifying a filter would delete ALL, then I would speculate the filter is wrongly formatted when being submitted from Blesta? Quote
0 1983ltd Posted October 4, 2013 Author Report Posted October 4, 2013 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." Quote
0 1983ltd Posted October 4, 2013 Author Report Posted October 4, 2013 Any chance of a resolution to this today? Im completely stuck without a solution.... Cheers.. Quote
0 Tyson Posted October 4, 2013 Report Posted October 4, 2013 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 Michael 1 Quote
0 1983ltd Posted October 4, 2013 Author Report Posted October 4, 2013 Thanks Tyson, will try it now Quote
0 Tyson Posted October 5, 2013 Report Posted October 5, 2013 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". Quote
0 1983ltd Posted October 5, 2013 Author Report Posted October 5, 2013 Just tested it and appears to do the trick my end also... Thanks again.. Quote
0 1983ltd Posted October 5, 2013 Author Report Posted October 5, 2013 I spoke too soon, It just deletes ALL of them again!!!! Quote
0 1983ltd Posted October 5, 2013 Author Report Posted October 5, 2013 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 Quote
0 Paul Posted October 5, 2013 Report Posted October 5, 2013 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. Quote
0 Tyson Posted October 5, 2013 Report Posted October 5, 2013 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. Michael 1 Quote
0 Paul Posted October 5, 2013 Report Posted October 5, 2013 Attached are the 2 files committed after plesk_customer_accounts.php. - plesk.php (~93KB) goes in /components/modules/plesk/plesk.php - plesk.php (~8KB) goes in /components/modules/plesk/language/en_us/plesk.php Be sure you put the right plesk.php in the right place. plesk.php plesk.php Michael 1 Quote
Question
1983ltd
If any customer cancels a single domain hosting package from within blest, it deletes ALL customers and ALL domains from the entire plesk server!
Can someone explain why I just lost ALL sites and customers including all the data from Plesk?
19 answers to this question
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.