Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] #3

Closed
sevnodes opened this issue Nov 10, 2024 · 22 comments
Closed

[Bug] #3

sevnodes opened this issue Nov 10, 2024 · 22 comments
Assignees
Labels
bug Something isn't working

Comments

@sevnodes
Copy link

Hello, I'm not one to comment or anything. But this time I'm going to do it so that this plugin can be improved further. I can't synchronize the data to my server with ISPConfig it returns that error.

The plugin is very good, what fails is that and that when a user is created, it does not create a user, it creates the site without associating it with the user.

image

@sevnodes sevnodes added the bug Something isn't working label Nov 10, 2024
@jsonkenyon
Copy link
Collaborator

ISPConfig3 doesn't have an API endpoint to actually sync the account, so this is expected. However, it creating the website, but not the user is an issue. In my testing it was also making the user account, did you by chance get any error when the account was being created?

@sevnodes
Copy link
Author

As far as I know, I have not received any errors, only that it did not synchronize those things that I mentioned and that it causes problems when synchronizing, that it basically does not synchronize. What I would like above all is for everything to be synchronized, both the limitations and everything, to create the user account and when I suspend someone for non-payment, then if I suspend in FOSSBilling, then the account and the site in ISPConfig will be suspended.

@jsonkenyon
Copy link
Collaborator

I’ll take another peek tomorrow when I get off work, see if I can find any issues. Also I’ll take a look at the syncing, we might be able to do something for it. I was planning on updating the code to clean it up also so I’ll use this as a chance to also do that

@sevnodes
Copy link
Author

Perfect, I'm sure you can improve it and clean up the code. I hardly understand PHP otherwise it would help you. Anything testing or whatever, let me know and I'll try it. I will wait for your response.

@jsonkenyon
Copy link
Collaborator

Wasn’t able to get to this today, having some car troubles and been working on that after work, and should be fully fixed tomorrow. So I’ll have to push this out until Wednesday as long as I’m able to fix my car.

@sevnodes
Copy link
Author

No rush, take your time without problem 💪

@jsonkenyon
Copy link
Collaborator

I conducted some testing today and was unable to replicate the issue with the client/user not being created. The user was successfully created and linked to the corresponding website. However, this does highlight areas where the process could be further optimized.

If you're experiencing an issue where the user isn't being created on your end, it's possible that the problem lies with the permissions of the API user you're using. Could you please share a screenshot of those permissions for further review?

From my perspective, the process should ensure that the user/client is successfully created. If the creation fails, the process should halt and trigger an error. I will proceed with making the necessary updates to address this.

@sevnodes
Copy link
Author

image

image

Now what I told you is working for me but it has not been assigned what I have delimited in the space template and that has been made unlimited

@sevnodes
Copy link
Author

image

But it won't let me synchronize from FossBilling so that it applies that it only has 10GB, not unlimited

@sevnodes
Copy link
Author

image

@jsonkenyon
Copy link
Collaborator

Thank you for the update. I understand the current limitations with account syncing, and while this feature isn't supported at the moment, I will explore alternative solutions to enable syncing.

Regarding your comment about user creation — "When a user is created, it does not create a user; it creates the site without associating it with the user" — could you clarify the specifics of this process? Is the module creating the website but not the user account, and failing to link it in ISPConfig3? Or is this issue more closely related to the account syncing challenge?

Your insights would be helpful for better understanding and resolving the situation.

@sevnodes
Copy link
Author

The rest is all correct, I have already gotten it to work. What would be missing is that when the user is created it does not have the established limitations. And also if I want the user to create more sites without having to purchase the plan more times, how do I do it?

@sevnodes
Copy link
Author

The thing is that multidomain is allowed in my plan. And I need to be able to host more domains on the same plan.

@jsonkenyon
Copy link
Collaborator

Thank you for the clarification—this makes much more sense now. I had some questions about these settings and was hoping for insight from someone more familiar with ISPConfig3.

It appears the issue stems from the createClient function. I was using the example data provided by ISPConfig3, which sets certain values to -1 (indicating unlimited). I will update this in the coding to pull it from FOSSBilling, which should resolve the issue.

@sevnodes
Copy link
Author

Perfect, I'm glad I was able to clarify

@jsonkenyon
Copy link
Collaborator

jsonkenyon commented Nov 15, 2024

The changes made should address the limits issue and apply them correctly. Could you please test it at your earliest convenience?

Link to code

I will continue to consider potential solutions for the syncing issue and explore options to resolve it.

@sevnodes
Copy link
Author

I'll try it and let you know, thank you.

@sevnodes
Copy link
Author

image
It works but the ideal is to add that you can modify all the fields of the limiting template. So that if you establish that 3 CRON tasks can be done, then there are only three tasks, not unlimited.

@jsonkenyon
Copy link
Collaborator

jsonkenyon commented Nov 15, 2024

This would need to be specified in the "Hosting Plan Additional Parameters" section.

Currently, FOSSBilling does not have a built-in setting to define the number of cron jobs. (That I know of)

I'll update the code soon to support custom values, and update the documentation. Taking my daughter out to a theme park and I'll get this done when I get back

So in other words it would be something like the following that we have now (except it would be for crons, etc):

Custom Package Values
vat_id - Default: NULL
web_php_options - Default: no,fast-cgi,cgi,mod,suphp,php-fpm (Not sure if all these options exist, I think only fast-cgi & php-fpm exists. Please LMK if you know.)
limit_shell_user - Default: 1
ssh_chroot - Default: no,jailkit,ssh-chroot
language - Default: en
pm_process_idle_timeout - Default: 30
pm_max_requests - Default: 30

@jsonkenyon
Copy link
Collaborator

jsonkenyon commented Nov 16, 2024

I've completed the task, and everything is ready to go. You now have the ability to configure additional custom package values. However, please note that it is not necessary to configure all of them if you are fine with leaving them set to unlimited (-1). The only exception is the limit_cron_frequency, which will default to 5 minutes if not specified. Below is a list of the custom package values available for adjusting the limits that FOSSBilling does not provide by default.

  • max_mail_domains
  • max_mail_aliases
  • max_mail_alias_domains
  • max_mail_forwarders
  • max_mail_catchall
  • max_mail_filters
  • max_fetchmail
  • mail_quota
  • limit_spam_policy
  • max_cron_jobs
  • limit_cron_frequency - Default: 5 minutes

You can use the following repository to test these changes. If everything looks good, I’ll go ahead and open the pull request for review and merge.

Thank you for your valuable feedback!

@sevnodes
Copy link
Author

Perfect, thank you very much. Then at night I try it. I'm from Spain and right now you catch me outside. Tonight I'll try and tell you.

@jsonkenyon jsonkenyon self-assigned this Nov 16, 2024
@jsonkenyon
Copy link
Collaborator

jsonkenyon commented Dec 4, 2024

Wanted to follow up here, did you have a chance to test?

--- EDIT

As there has been no update, I will assume that everything is good, and have pushed the new updated code to the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants