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

_TestConnection() function #8

Closed
resuni opened this issue May 30, 2018 · 1 comment
Closed

_TestConnection() function #8

resuni opened this issue May 30, 2018 · 1 comment

Comments

@resuni
Copy link

resuni commented May 30, 2018

I can't get the "_TestConnection()" function to work as described here: https://github.com/WHMCS/sample-provisioning-module/blob/master/modules/servers/provisioningmodule/provisioningmodule.php#L381

I return an array just like the example shows, but if I press the "Test Connection" button in the server settings, a loading wheel next to the button spins indefinitely. I know my code is executing fine, because I can use the "logModuleCall()" function to log expected values to the module debug log right before I return the array.

I also notice that "_TestConnection()" is not listed as a supported function in the documentation: https://developers.whmcs.com/provisioning-modules/supported-functions/

It seems like something about this function isn't documented right.

@resuni
Copy link
Author

resuni commented May 30, 2018

For anyone else that has this spinning wheel problem, I was able to fix it by switching from PHP 5.6 to PHP 7.2.

I'll close this issue, but I still think this function needs better documentation. For example, it looks like it's only possible to display a custom message when the test fails. Can a custom message be displayed when the test succeeds instead of just displaying "SUCCESS!"?

@resuni resuni closed this as completed May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant