Jump to content

Directadmin Module Options Are Reset If An Error Is Made During Package Creation


interfasys

Recommended Posts

This is a follow up to this bug
http://www.blesta.com/forums/index.php?/topic/1584-directadmin-module-options-fields-can-be-reset-when-creating-a-package/#entry12461
 
I've just followed the steps described in the original report and experienced the exact same problem with 3.1-b2.
Here are the steps again

  • Create new package
  • Select Directadmin module
  • Select a server group
  • Fill in the rest of the form
  • Type "mucho" in Term, under pricing
  • Hit "Create package"

For step 5, it can be anything. The purpose is to get Blesta to reject the package because of missing information.
The error message for step 5 as descrivbed above will be

Term must be a number.
The term must be greater than 0.

 

Expected result

Despite the error, no information should be lost. The form should look the same as it was filled before the "Create Package" button was clicked

 

Result

The "Directadmin Package" dropdown, in Module Options, is empty and the user has to select another module and then go back to selecting the DA module again in order to try and create the package again.

Link to comment
Share on other sites

How many servers and server groups do you have setup in Blesta (under [settings] -> [Company] -> [Modules] -> [Manage DirectAdmin])? What version of the DirectAdmin module are you using?

 

 

Result

The "Directadmin Package" dropdown, in Module Options, is empty and the user has to select another module and then go back to selecting the DA module again in order to try and create the package again.

What are the names of all of the fields that do not re-populate? Is it just the "DirectAdmin Package" field? If by empty, you mean the drop-down contains no options, then it's likely that the API request to fetch packages from DirectAdmin has failed because of any of several reasons, e.g.

  1. No module row (server) could be found in order to make the API request
  2. The Account Type selected is invalid and results in no DirectAdmin packages
  3. There was an error attempting to make the API request
Link to comment
Share on other sites

OK, I've just done some tests. It was only happening if the server group was specified (as apposed to selecting "Any") and the reason was that the group was empty  -_-  .

 

There is still a bug though, because I was selecting a group without any servers in it and it was populating all the fields for me, giving me the impression that everything was properly configured. It's only when reloading the form that the dropdowns would end up being empty.

Link to comment
Share on other sites

OK, I've just done some tests. It was only happening if the server group was specified (as apposed to selecting "Any") and the reason was that the group was empty  -_-  .

 

There is still a bug though, because I was selecting a group without any servers in it and it was populating all the fields for me, giving me the impression that everything was properly configured. It's only when reloading the form that the dropdowns would end up being empty.

 

 

No module row (server) could be found in order to make the API request

 

What most/all of the modules do is use the first module row if one cannot be found. So what I think happened is that you first selected the DirectAdmin module, it loaded up with the Server Group set to "Any", and chose the first module row it could find. Then you changed the group to one that had no servers in it, and none of the fields updated. Not until you tried to save the update did you notice the fields were blank because that server group has no servers. I created CORE-979 to resolve this.

Link to comment
Share on other sites

... So what I think happened is that you first selected the DirectAdmin module, it loaded up with the Server Group set to "Any", and chose the first module row it could find. Then you changed the group to one that had no servers in it, and none of the fields updated. Not until you tried to save the update did you notice the fields were blank because that server group has no servers. I created CORE-979 to resolve this.

I think you've got it right. I assumed it was a form refresh problem because I always selected the same (empty) group when doing my tests.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...