HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   API Kundennummer (http://www.howtoforge.com/forums/showthread.php?t=60704)

Germanius 26th February 2013 22:35

API Kundennummer
 
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

Germanius 26th February 2013 23:02

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?

till 26th February 2013 23:07

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.

Germanius 26th February 2013 23:14

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?

till 26th February 2013 23:22

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.

Germanius 26th February 2013 23:36

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.

till 26th February 2013 23:39

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

till 27th February 2013 11:07

1 Attachment(s)
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.

Germanius 27th February 2013 11:30

Yes, this fixes the issue. Thank you!


All times are GMT +2. The time now is 12:48.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.