Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Error during import of contacts and/or contact groups #7783

Open
StefThomas opened this issue Aug 16, 2019 · 2 comments
Open

Error during import of contacts and/or contact groups #7783

StefThomas opened this issue Aug 16, 2019 · 2 comments

Comments

@StefThomas
Copy link
Contributor

Centreon 19.04.3

When importing contacts or contactgroups :

PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'cg_ar_id' in 'field list' in /usr/share/centreon/www/class/centreonDB.class.php:267
Stack trace:
#0 /usr/share/centreon/lib/Centreon/Object/Object.php(178): CentreonDB->query('UPDATE contactg...', Array)
#1 /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php(365): Centreon_Object->update('2400', Array)
#2 /usr/share/centreon/www/class/centreon-clapi/centreonAPI.class.php(806): CentreonClapi\CentreonObject->setparam('HM_NAGIOS_UNIX;...')
#3 /usr/share/centreon/www/class/centreon-clapi/centreonAPI.class.php(769): CentreonClapi\CentreonAPI->launchActionForImport()
#4 /usr/share/centreon/bin/centreon(200): CentreonClapi\CentreonAPI->import('centreon-clapi-...')
#5 {main}
thrown in /usr/share/centreon/www/class/centreonDB.class.php on line 267

In the CLAPI file only "ar_id" is found, no "cg_ar_id", in the code too, I didn’t find where it could come from…

Also, why is this field the only one which is not prefixed with "cg_" in the contactgroup table ?

@lpinsivy
Copy link
Contributor

Hi @StefThomas maybe we have an issue when we export the contact table in CLAPI and we didn't remove the cg_ from cg_ar_id field.

If you remove the import works?

@StefThomas
Copy link
Contributor Author

StefThomas commented Aug 19, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants