Topic: Add a new Supplier

Hello All,

While adding a new supplier, i fill in all the details, and when i click on "Add new supplier details", it forwards me to a page that only says "Back". I'm unable to add any suppliers. Please help.

Re: Add a new Supplier

Anything in the error log .../tmp/errors.log ?

Re: Add a new Supplier

rafat wrote:

Anything in the error log .../tmp/errors.log ?

The log :

[04-Sep-2022 05:24:55 America/New_York] 0:admin:crm_contacts_db.inc:13: Unhandled exception [0]: Too few arguments to function add_crm_person(), 10 passed in /home/bluestyp/public_html/frontaccounting/purchasing/manage/suppliers.php on line 94 and at least 11 expected.

Re: Add a new Supplier

State your environment please. FA , OS PHP and APACHE.

Re: Add a new Supplier

rafat wrote:

State your environment please. FA , OS PHP and APACHE.

I'm a bit unsure of what you mean, but

Front Accounting version : 2.4.10
Operating System : linux (Architecture    x86_64)
PHP Version : 7.2.34
Apache Version : 2.4.54

Apologies if that's not what you asked for.

Re: Add a new Supplier

Your OK with environment I just missed to as ask you your mysql version. Please mention that. Meanwhile you need to enable debugging for analysis. You need to edit ...config.php to the following and revert back to what it was before after trying to add a supplier again. Also list what the errors.log has after the change:

    $go_debug         = 1;    // set to 1 for basic debugging, or 2 to see also backtrace after failure.

Re: Add a new Supplier

rafat wrote:

Your OK with environment I just missed to as ask you your mysql version. Please mention that. Meanwhile you need to enable debugging for analysis. You need to edit ...config.php to the following and revert back to what it was before after trying to add a supplier again. Also list what the errors.log has after the change:

    $go_debug         = 1;    // set to 1 for basic debugging, or 2 to see also backtrace after failure.


MySQL Version : 10.3.35-MariaDB-log-cll-lve


$go_debug         = 0

errors.log : 0:admin:crm_contacts_db.inc:13: Unhandled exception [0]: Too few arguments to function add_crm_person(), 10 passed in /home/bluestyp/public_html/frontaccounting/purchasing/manage/suppliers.php on line 94 and at least 11 expected.


$go_debug         = 1

errors.log : 0:admin:crm_contacts_db.inc:13: Unhandled exception [0]: Too few arguments to function add_crm_person(), 10 passed in /home/bluestyp/public_html/frontaccounting/purchasing/manage/suppliers.php on line 94 and at least 11 expected.

$go_debug         = 0 // Back to zero

errors.log : 0:admin:crm_contacts_db.inc:13: Unhandled exception [0]: Too few arguments to function add_crm_person(), 10 passed in /home/bluestyp/public_html/frontaccounting/purchasing/manage/suppliers.php on line 94 and at least 11 expected.

8 (edited by rafat 09/04/2022 06:36:27 pm)

Re: Add a new Supplier

sorry @stig I was not able to reproduce your error. Can you explain exactly how you are doing it? I understand it might be trivial but it should be helpful to understand, Also Language u use??

Re: Add a new Supplier

Seems like one optional parameter changed as strict.

 
add_crm_person($ref, $name, $name2, $address, $phone, $phone2, $fax, $email, $lang, $notes,
    $cat_ids=null, $entity=null)

Here $cat_ids is 11th parameter. Which is optional parameter in FA.  How the null has been removed from your code.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Add a new Supplier

@stig
Did kvvaradha provided a solution to your problem?. If so please update. Thanks to @kvvaradha for his contribution. I would like to remind all users who report  problems thru the forum to please update the status of the suggestions given by other community member . This will benefit the whole community.

Re: Add a new Supplier

In the current version 2.4.12+ as on date it is line 92 onwards as:

        add_crm_person($_POST['supp_ref'], $_POST['contact'], '', $_POST['address'], 
            $_POST['phone'], $_POST['phone2'], $_POST['fax'], $_POST['email'], 
            $_POST['rep_lang'], '');

Here ther are only 10 arguments including 2 blank defaults.

Re: Add a new Supplier

@apmuthu fa code is correct. He might be modified. Optional parameters wont issue this error. Someone changed the 11 parameter for his code as strict parameter. Which results this issue  i guess.

Subscription service based on FA
HRM CRM POS batch Themes