Details
Description
When creating a Package and selecting the cPanel module, Blesta attempts to query the first module row for cPanel and use that servers API credentials to fetch the package listing via the "listpkgs" API command.
This is problematic if the 1st server listed is no longer in use. The drop down for the cPanel Package selection will never render. Neither does the Server Group.
However, if editing a package that specifies a server group that contains servers that are active, the cPanel Package dropdown will load.
I suspect that because the default option for the Server Group dropdown is "All", that it forces the 1st server to be used.
Rather, I think it makes more sense to default the Server Group dropdown to "Please Select", so that it only performs the API call when "All", or a specific Server Group is selected. This will allow the user to select a server group that contains active servers so that it can fetch the cPanel Packages and populate the dropdown.