Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Error when auto add peripheral #3142

Closed
CorentinS6 opened this issue Apr 7, 2021 · 8 comments
Closed

Error when auto add peripheral #3142

CorentinS6 opened this issue Apr 7, 2021 · 8 comments
Assignees
Labels
Milestone

Comments

@CorentinS6
Copy link

Hello,

I have an error when fusion auto add a peripherical :

[2021-04-07 14:42:21] glpisqllog.ERROR: DBmysql::query() in /var/www/glpi/inc/dbmysql.class.php line 309 *** MySQL query error: SQL: INSERT INTO glpi_peripherals (manufacturers_id, name, serial, is_dynamic, entities_id, otherserial, groups_id_tech, date_creation, date_mod) VALUES ('189', 'Flash Drive (Store'n'Go)', '13092991004108', '1', '1', '', '26', '2021-04-07 14:42:21', '2021-04-07 14:42:21') Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'n'Go)', '13092991004108', '1', '1', '', '26', '2021-04-07 14:42:21', '2021-04...' at line 1 Backtrace : inc/dbmysql.class.php:1148 inc/commondbtm.class.php:602 DBmysql->insert() inc/commondbtm.class.php:1150 CommonDBTM->addToDB() ...ventory/inc/inventorycomputerlib.class.php:1632 CommonDBTM->add() ...ry/inc/inventorycomputerinventory.class.php:556 PluginFusioninventoryInventoryComputerLib->updateComputer() ...inventory/inc/inventoryruleimport.class.php:973 PluginFusioninventoryInventoryComputerInventory->rulepassed() inc/rule.class.php:1420 PluginFusioninventoryInventoryRuleImport->executeActions() inc/rulecollection.class.php:1437 Rule->process() ...ry/inc/inventorycomputerinventory.class.php:341 RuleCollection->processAllRules() ...ry/inc/inventorycomputerinventory.class.php:102 PluginFusioninventoryInventoryComputerInventory->sendCriteria() ...fusioninventory/inc/communication.class.php:227 PluginFusioninventoryInventoryComputerInventory->import() ...fusioninventory/inc/communication.class.php:461 PluginFusioninventoryCommunication->import() plugins/fusioninventory/front/communication.php:92 PluginFusioninventoryCommunication->handleOCSCommunication() plugins/fusioninventory/index.php:59 include_once()

Is the name with quote the source of this ? => Flash Drive (Store'n'Go)

Regards

GLPI 9.5.4 ( => /var/www/glpi) Installation mode: TARBALL
fusioninventory Name: FusionInventory Version: 9.5+3.0 State: Enabled

@ddurieux
Copy link
Member

ddurieux commented Apr 7, 2021

Seems a problem with the '.
Is it possible to post or send me by mail the XML of the agent?

@CorentinS6
Copy link
Author

Hello.
I'm sorry, i cannot find the computer that generate this error, and I am not sure i can act on it (possibility a laptop at home, etc).
Regards

@steph461
Copy link

steph461 commented Oct 6, 2021

I have the same problem and i have the file XML of computer
I attach the log sql.error
sql-errors.log

In my file XML Computer , i have

   <USBDEVICES>
      <CAPTION>Flash Drive (Store'n'Go)</CAPTION>
      <MANUFACTURER>Verbatim, Ltd</MANUFACTURER>
      <NAME>Flash Drive (Store'n'Go)</NAME>
      <PRODUCTID>0243</PRODUCTID>
      <SERIAL>12192404000025</SERIAL>
      <VENDORID>18A5</VENDORID>
   </USBDEVICES>

VERSION GLPI 9.5.6 et FusionInventory 9.5+3.0

@steph461
Copy link

steph461 commented Oct 6, 2021

image

@g-bougard
Copy link
Contributor

Hi @CorentinS6 & @steph461
can you try to apply #3086 in your environment and report if it fixes your issue ?

@steph461
Copy link

steph461 commented Oct 6, 2021

I have aply the fix, its ok and no error

in GLPI its OK
image

thx :)

@CorentinS6
Copy link
Author

Hello,
I apply the fix (ty for that). I give you a feedback in a few days.
Regards

@CorentinS6
Copy link
Author

Hello,
seems to fix the issue.
TY !
Regards.

@ddurieux ddurieux self-assigned this Oct 11, 2021
@ddurieux ddurieux added the bug label Oct 11, 2021
@ddurieux ddurieux added this to the 9.5+3.1 milestone Mar 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants