Squidix Web Hosting Posted July 12, 2015 Report Posted July 12, 2015 There are situations in which Blesta's data may not change, but you still want to send that data to the module to make an update. Right now, data is only sent to the module when it's different from the old Blesta data. However, in the case of a migration for instance, the data in Blesta (cPanel package, password) will not and should not be expected to match the data in the module. Only downside to this is a slight performance penalty when "use module" is checked. If the user checks "use module" it is not unreasonable to expect that changes will be sent to the module and a penalty will be incurred. The more foundational issue here is that Blesta should not always make the assumption that its data is always correct (meaning in sync with any external systems used by a module), which it seems to have a tendency to do in this situation as well as others. Billing and order processing can and does get messy. The current approach assumes ideal circumstances and makes anything else very difficult. Quote
activa Posted July 12, 2015 Report Posted July 12, 2015 can you explain more ? from cpanel module, there are a rules that should be checked in any change made . if you uncheck the use_module , the data is saved loccaly and not in remote server . Quote
Squidix Web Hosting Posted July 12, 2015 Author Report Posted July 12, 2015 I'm saying that sometimes the data will be out of sync, so data should be propagated to the module regardless of whether or not it matches the current local data. The only downside is a slight performance hit... but this is an explicit manual action and can be easily avoided by unchecking "use module" anyway. Quote
Tyson Posted July 13, 2015 Report Posted July 13, 2015 I can see the inconvenience. The alternative would be to change it to something else with Use Module unchecked, then change it back with Use Module checked, which most people probably wouldn't figure out. Quote
Squidix Web Hosting Posted July 13, 2015 Author Report Posted July 13, 2015 I can see the inconvenience. The alternative would be to change it to something else with Use Module unchecked, then change it back with Use Module checked, which most people probably wouldn't figure out. That's what I've been doing. Basically I'd like to be able to pull up the service, hit the "save" button once and close it out not having to wonder if everything if in sync. 2 seconds vs 1 minute. Note - this should apply to packages as well (that's probably even more important than service fields). Perfect example, just did a migration, if I was using Blesta I would have had to go change the package manually or I would have to go through multiple steps to make sure the account was on the proper package. Quote
Squidix Web Hosting Posted July 13, 2015 Author Report Posted July 13, 2015 Patched: Replace if ($vars['use_module'] == "true") block in editService method on cpanel module. // Only update the service if 'use_module' is true if ($vars['use_module'] == "true") { // Update password (if present) if (isset($vars['cpanel_password'])) { $this->log($row->meta->host_name . "|passwd", "***", "input", true); $result = $this->parseResponse($api->passwd($service_fields->cpanel_username, $vars['cpanel_password'])); } // Update username and domain $params = array('newuser' => $vars['cpanel_username'], 'domain' => $vars['cpanel_domain']); $this->log($row->meta->host_name . "|modifyacct", serialize($params), "input", true); $result = $this->parseResponse($api->modifyacct($service_fields->cpanel_username, $params)); } activa 1 Quote
Squidix Web Hosting Posted November 3, 2015 Author Report Posted November 3, 2015 Following up on this. 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.