2
WHMCS White Screen with provisioning module
Problem reported by Gerardo Altman - 8/17/2014 at 7:37 PM
Submitted
Hi Team
 
We have recently downloaded and installed the WHMCS provisioning module for SmarterMail (release 14th Jan 2014).
 
All instructions have been followed to install and configure all options as per readme.txt and "http://help.smartertools.com" WHMCS Product/Service Module.
 
When the module tries to provision a domain using either the "create" button or via the auto provision after a cart purchase it fails with a blank white screen.
 
  1. there are no errors in the error log (apache)
  2. no errors or even output from the WHMCS modules log
  3. we have display errors turned on but nothing on screen apart from blank white screen
Also the setup guide is lacking detailed information for each field in the WHMCS > setup > products/ services > package name > module settings >
 
it would be good to have a mouse over or additional information on each field in the setup guide (readme.txt or help.smartertools.com).
 
There also appears to be no option to enable ActiveSync in the module.
 
any help would be greatly appreciated.
 
Thank you
Gerardo.

21 Replies

Reply to Thread
1
Employee Replied
Employee Post
Hello Gerardo,
 
Taking a look at this locally, I am not seeing any type of issue that you reported.  Given that is the case, I have reached out to you directly to get a better idea as to what might be taking place.
 
Thanks
1
Nicolas Le Merle Replied
I had the same problem the 1st time round. I deleted it module and started again from scratch following the below step by step and it worked:
 
 
 
I think the problem I had the 1st time round was with the 'server' config. Give it another go and let me know if you having any issues. Ill go through my config again and check what I did.
 
Cheers,
Nic
0
User Replied
Thanks for the details regarding your experience Nic. I will walk through the process myself here locally just to verify that nothing is out of line.
0
Robbie Wright Replied
We are having the same issue as well. Blank page when attempt to accept the order in WHMCS. We've been through the setup multiple times and continue to have the error. If there is a common misconfiguration error, we'd love to hear it or help find it. 
0
Tim Uzzanti Replied
Employee Post
Please start a ticket on this issue with support.  We are unable to duplicate the problem and it will require further evaluation.
 
Thanks,
 
Tim Uzzanti
Tim Uzzanti CEO SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Robbie Wright Replied
ticket opened
0
Robbie Wright Replied
Gerardo, we have a ticket open with SM on this topic and are still going back and forth with them. Do us one favor though. In WHMCS, go to setup > general settings > other. Third to last option is display errors. Check that box to display php errors and then try to submit the order again. Let us know if you see something like this:
 
Fatal error: Call to undefined function smartermail_toArray() in /modules/servers/smartermail/smartermail.php on line 590
 
 
Which leads to an issue with this array, for us at least and specific for the last if statement:
 
//    Converts JSON Data Structure from .NET Web Service to Array
function sm_toArray($obj){
    $return=array();
    if (is_array($obj)) {
        $keys=array_keys($obj);
    } elseif (is_object($obj)) {
        $keys=array_keys(get_object_vars($obj));
    } else {return $obj;}
    foreach ($keys as $key) {
        $value=$obj->$key;
        if (is_array($obj)) {
            $return[$key]=smartermail_toArray($obj[$key]);
        } else {
            $return[$key]=smartermail_toArray($obj->$key);
        }
    }
    return $return;
}
?>
0
W. T. Leaver Replied
Did this ever get figured out? I have a similar white page problem. I enabled error display in whims, and on an existing service in WHMCS on SmarterMail I get this error when accessing the client area (smartermail.php in this module does call GetDomainInfo2 which doesn't seem to be listed as an actual available method though GetDomainInfo obviously does exist.)
 
Fatal error: Uncaught SoapFault exception: [Function ("GetDomainInfo2") is not a valid method for this service] 0 in /home/leaverco/public_html/includes/classes/WHMCS/Terminus.php:0 Stack trace: #0 /home/leaverco/public_html/includes/classes/WHMCS/Terminus.php(0): WHMCS_Terminus::whmcsExceptionHandler() #1 [internal function]: WHMCS_Terminus->whmcsExceptionHandler(Object(SoapFault)) #2 {main} thrown in /home/leaverco/public_html/includes/classes/WHMCS/Terminus.php on line 0
0
W. T. Leaver Replied
So I removed the final 2 from the GetDomainInfo call in smartermail.php and that seems to work. So why the 2 in the first place? Is it new in SM 14? (I'm on the latest 13).

Once I renamed the call things work, except when I add a user, if I don't meet the password compliance requirements, I get a action completely successfully message in WHMCS, but the user is not created. I don't seem to be able to delete user either, though I also get a successful message for that (but the user is still there.)

Maybe I should upgrade to SM14 but I generally like to wait for a few minor releases with a major release.
0
Matt Petty Replied
Employee Post
Thanks for letting us know. There was a recent change we made that is causing the exception this will be fixed soon.
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
W. T. Leaver Replied
Okay, that's good to know! How about the problems creating a user when the password strength requirement is not met, or problems deleting a user? (In both cases success messages are given in the WHMCS client area, but the actions are not actually completed.)

Is there an earlier version of the module I can download for now?
0
W. T. Leaver Replied
Well, I did find an older module at http://www.smartertools.com/downloads/whmcs/WHMCS_SmarterMailProvisioningModule.zip but the WHMCS client area shows a "Call to undefined function smartermail_toArray()" error when you try to manage users/aliases.

Sure enough there are two calls to smartermail_toArray() within a sm_toArray function in smartermail.php but no smartermail_toArray() function declared anywhere in the code.

Even "guessing" that smartermail_toArray() should have been sm_toArray() (meaning sm_toArray recursively calls itself), while it allows one to get farther in the client area, still the user management features don't seem to work.

So, at least as far as I can tell, currently the newest version is the only one which sort of works, if you change the occurence of GetDomainInfo2 to GetDomainInfo in smartermail.php, but then adding a user won't work if the password doesn't meet requirements, and deleting a user doesn't seem to work, although both falsely indicate success.
0
Matt Petty Replied
Employee Post
Just released a new version that should fix:
That missing function, deleting user not working, and all calls were returning true, no matter what.

http://www.smartertools.com/Downloads/WHMCS/SmarterMailProvisioningModule.zip
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
W. T. Leaver Replied
Thanks, it appears to be working better. Last question--why are there a bunch of options under Management Tools with (API) at the end? They are bound to confuse users.

The first three options seem okay:

Manage SmarterMail Users and Aliases - FORM
Add SmarterMail User
Add SmarterMail Alias

The rest of them seem like they are more likely to confuse than to be of use:

Create User (API)
Create Alias (API)
Edit Alias (API)
Delete Alias (API)
Edit User (API)
Delete User (API)
Save User (API)
Save Alias (API)

I'll probably tailor SmarterMail to remove the " - FORM" from the first option and not show any of the API entries, but I'd like to know why they are there?
0
Matt Petty Replied
Employee Post
If those are removed from the smartermail.php file, the provisioning module will fail to make those calls. Unfortunately there is not much that can be done to those unless you use javascript.
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
W. T. Leaver Replied
That's an odd design. Why do you have to have menu items visible in order to call APIs? I hope you guys will redesign that in future modules. I know of no third party WHMCS module with such an odd design.
0
Matt Petty Replied
Employee Post
I looked at their documentation and it is actually possible to link functions without them showing up.
I have updated the version to 1.3.
https://portal.smartertools.com/kb/a2930/whmcs-provisioning-module-for-smartermail.aspx
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
W. T. Leaver Replied
Matt, I appreciate your continued quick reaction on this! I'm not sure I understand this last update. The function smartermail_ClientAreaCustomButtonArray() still loads up all of those options that end in (API). Are you saying I can safely remove those now and everything will still work? If that's the case shouldn't they *not* be there in the first place?
0
Matt Petty Replied
Employee Post
Sorry, the actual zip file was not updated. A slight miscommunication the actual new version should be up now.
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
W. T. Leaver Replied
Matt, thanks for that--finally got around to downloading and have confirmed those (API) entries are gone now. Three more enhancements to the module would really make it perfect for us: 1) Allow a (numeric range) configurable option for user count, such that we can allow the client to order exactly the number of users he wants, and add a setting to the base options for default mailbox size, so that when using a configurable number of users the module will set the domain size to user count * default mailbox size; 2) allow a setting in the base module configuration to enable Archiving, with four options: None/Incoming/Outgoing/Both and make sure when upgrading/downgrading that the option is toggled off/on if it changes (I was coding this up in a module awhile back but could never get my question at http://portal.smartertools.com/community/a285/data-structure-for-parameters-setdomainarchiverule-using-php-soap.aspx answered; and 3) Allow for a (numeric range) configurable option for the number of ActiveSync users needed, and when set enable ActiveSync user management and set the ActiveSync user limit. Error on creation or upgrade/downgrade if the user has chosen more ActiveSync users than his actual user limit.
0
Matt Petty Replied
Employee Post
I have added those to our feature requests, Thanks for the update.

Would you be able to make a new request thread that way it can be tracked easier.
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com

Reply to Thread