API Kundennummer

Discussion in 'Developers' Forum' started by Germanius, Feb 26, 2013.

  1. Germanius

    Germanius Member

    ISPC 3.0.5.1
    Why do I have to set the customer number via the API? If I leave it empty i get this error:
    SOAP Error: customer_no_error_unique
    If I want to add a client in ISPC this field is marked with a *, so it is optional.
    Where is the sense of the customer number?

    Regards
     
    Last edited: Feb 26, 2013
  2. Germanius

    Germanius Member

    If I want to add a website via the API I recognized that I have to define
    pm_process_idle_timeout and
    pm_max_requests
    although I dont want to create a site with PHP-FPM. And only those two are necessary, not the others like pm.max_spare_servers. Why?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The variables are required and you have to set them when you use the api. The interface sets them as well. It does not matter which php mode you use.
     
  4. Germanius

    Germanius Member

    Thats right for PHP-FPM, I saw it now.
    But thats not the case for the customer number. It is not set threw the controlpanel but I have to set it threw the API. Why?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The api checks are the same checks then the ones from the interace as the api uses the same plugins but in some cases the interface sets default values or auto generated values. If you want to know in detail which check is performed for a specific field and which values are alloed and / or required, then take a look into the corresponding form file. In this case, the client form.
     
  6. Germanius

    Germanius Member

    Code:
    'customer_no' => array (
    			'datatype'	=> 'VARCHAR',
    			'formtype'	=> 'TEXT',
    			'validators'	=> array ( 	0 => array (	'type'	=> 'UNIQUE',
    														'errmsg'=> 'customer_no_error_unique',
    														'allowempty' => 'y'),
    									),
    			'default'	=> '',
    			'value'		=> '',
    
    I found this in the client.tform.php. I can add clients threw the controlpanel and leave the customer number empty. But threw the API I cant leave it empty.

    I think there is a problem with 'type' => 'UNIQUE', because I can add the first client threw the api by leaving the customer number empty. But if I want to add a second client with leaving the customer number empty I get the error message.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Make a bugreport in the bugtracker and we will check it then.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Attached is a fixed remoting base library. The check in the remote function did not contain the last modification for empty values that was made in the interface. Please check if this fiyes your issue. The file has to be copied to /usr/local/ispconfig/interface/lib/classes/ after unzipping it.
     

    Attached Files:

  9. Germanius

    Germanius Member

    Yes, this fixes the issue. Thank you!
     

Share This Page